Faculty of Information Technology
Software Engineering Group

Opened 5 years ago

Last modified 4 years ago

#229 testing defect

Saving workspace into a file renames a directory which should not be renamed

Reported by: Patrik Svestka Owned by: Patrik Svestka
Priority: major Milestone:
Component: default Keywords:
Cc: Also affects CVS HEAD (eXept version): no

Description (last modified by Patrik Svestka)

Steps to reproduce the issue:

1) create a directory e.g.

C:\prg\Smalltalk\StX\search_for_substring

2) create some code in workspace

3) select the path that is already there and copy the path from step 1) into the Filename field and press enter

Now two things can happen

4a) If it is the first time you do this, you can end up with deleted directory C:\prg\Smalltalk\StX\search_for_substring and two files search_for_substring and search_for_substring.bak
4b) You can get a renamed directory search_for_substring.bak and file named search_for_substring (if you have already saved the file before)

Expected behavior:

If the file is same as the already created directory warn the user that he can't save the file due to the fact there is a directory with the same name.

Attachments (3)

WorkspaceApplicationTests-test_issue229.st (1.7 KB) - added by Patrik Svestka 5 years ago.
Test proves that the behaviour of reported bug
FileDialog-doAccept.st (584 bytes) - added by Jan Vrany 5 years ago.
libtool_fix_1_of_1_rev_73f73118f3b8_Issue__229__Saving_workspace_into_a_file_renames_a_directory_which_should_not_be_renamed.patch (4.3 KB) - added by Patrik Svestka 4 years ago.
When directory only path is entered, it is correctly changed to it in the FileDialog?

Download all attachments as: .zip

Change History (9)

comment:1 Changed 5 years ago by Patrik Svestka

Description: modified (diff)

comment:2 Changed 5 years ago by Patrik Svestka

Owner: set to Patrik Svestka
Status: newassigned

comment:3 Changed 5 years ago by Patrik Svestka

Adding to expecting behaviour:
Perpahs it would be even better to change to a directory when user enters a directory instead of saving it. That is matter of view and approach.

Anyways I'm attaching a test case to show the bug:

Changed 5 years ago by Patrik Svestka

Test proves that the behaviour of reported bug

Changed 5 years ago by Jan Vrany

Attachment: FileDialog-doAccept.st added

comment:4 Changed 4 years ago by Patrik Svestka

I've created a patch with test based on your help, thank you Jan!

Changed 4 years ago by Patrik Svestka

When directory only path is entered, it is correctly changed to it in the FileDialog?

comment:5 Changed 4 years ago by Patrik Svestka

Status: assignedaccepted

comment:6 Changed 4 years ago by Patrik Svestka

Status: acceptedtesting
Note: See TracTickets for help on using tickets.