#3684 File name field value not always used

minor bug
closed-works-for-me
nobody
5
2013-07-10
2012-04-23
Victor Engmark
No

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.

Discussion

  • Victor Engmark
    Victor Engmark
    2012-04-23

    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".

     
  • Ankita Gupta
    Ankita Gupta
    2012-08-23

    I want to fix this bug. i would need some help regarding the code base. Plz assign it to me

     
  • Dale Anson
    Dale Anson
    2013-07-10

    • status: open --> closed-works-for-me
     
  • Dale Anson
    Dale Anson
    2013-07-10

    This works fine in jEdit 5.0 and later.