bugGNU nano - Bugs: bug #44950, trying to open a file in a...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #44950: trying to open a file in a non-existent directory should produce a clear warning

Submitter:  Benno Schulenberg <bens>
Submitted:  Tue 28 Apr 2015 07:37:48 PM UTC
   
 
Severity:  3 - Normal Status:  Fixed
Assigned to:  bens Open/Closed:  Closed

Wed 20 Jan 2016 04:18:15 PM UTC, comment #3: 

Fixed in SVN, r5572 and 5574.

Benno Schulenberg <bens>
Group administrator
Thu 14 Jan 2016 05:09:41 PM UTC, comment #2: 
Benno Schulenberg <bens>
Group administrator
Thu 14 Jan 2016 05:07:43 PM UTC, comment #1: 

Rishabh Dave has been working on this bug for a while [1], and as a result my opinion on what nano should do has changed.  Other editors will also happily start with a file in a directory that doesn't exist.  Only a few will produce a warning or a hint about this.  But all of them will keep the name and path that the user provided.  So nano should do this too.

So instead of discarding what the user specified, nano should beep and put a warning on the statusbar (similar to what happens when the user tries to edit a directory).

And probably nano should do the same again when the user tries to write this file (instead of the long and confusing message "Error writing thisisatypo/somefile: No such file or directory").

Benno Schulenberg <bens>
Group administrator
Tue 28 Apr 2015 07:37:48 PM UTC, original submission:  

Running 'nano thisisatypo/somefile' will report on the statusbar: "Error writing lock file: Directory 'thisisatypo' doesn't exist", but then still happily displays "thisisatypo/somefile" in the titlebar.  When not paying any attention to that message (out of habit) and typing things into the buffer and then trying to save... the file cannot be written, and the message is puzzling: "Error writing thisisatypo/somefile: No such file or directory".

It would be much better if nano discarded any argument on the command line that is not a real and readable file.

Benno Schulenberg <bens>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by bens (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-02-13 bens Open/ClosedOpen Closed
    2016-01-20 bens StatusIn Progress Fixed
    2016-01-14 bens StatusNone In Progress
        Assigned toNone bens
        Summarytrying to open a file in a non-existent directory should not go ahead trying to open a file in a non-existent directory should produce a clear warning

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code