PreviousNextTracker indexSee it online !

(160/213) 3520572 - File name field value not always used

Really weird reproducible bug:
1. Open an existing file with the name comment_history.jst.eco.
2. File -> Save as...
3. There is already a "targets.jst.eco" file, and I'd like to save the file as the "singular" of that, so I click targets.jst.eco. This prefills the File name field.
4. Remove the first "s" from the File name field, so that it reads "target.jst.eco". This file does not exist.
5. Click Save.

Now I would expect the save operation to succeed, create a new "target.jst.eco" file, and open that in the editor. But instead I get a warning that "[t]he file targets.jst.eco already exists." This is not the same value as the File name field. It looks like focusing a file in the "Save as" dialog subsequently *ignores* the File name field value.

I tried this again, removing another character from the field so it read "targe.jst.eco", and it still complained about "targets.jst.eco".

Suggestion: The File name field value should always be used for the file name, no matter if a file is selected or not.

Workaround: After editing the File name field, de-select the file by Ctrl-clicking it before saving.

Submitted engmark - 2012-04-23 - 08:52:29z Assigned nobody
Priority 5 Category editor core
Status Open Group minor bug
Resolution None Visibility No

Comments

2012-04-23 - 08:59:13z
engmark
jEdit 4.3.2, server mode, using Java 1.6.0_23 on Ubuntu 11.10 64-bit. I can\'t seem to find any lines in the activity log relating to the first creation of "target.jst.eco".
2012-08-23 - 13:29:31z
ankita-gupta
I want to fix this bug. i would need some help regarding the code base. Plz assign it to me

Attachments

2012-04-23 - 08:52:35z
engmark
2012-04-23-103857_3120x1920_scrot.png

Screenshot of the issue