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

 
 

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

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

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

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

Fixed in SVN, r5572 and 5574.

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Thu 14 Jan 2016 05:09:41 PM UTC, comment #2:

[1] https://lists.gnu.org/archive/html/nano-devel/2015-12/msg00017.html

And a message that explains the further evolved point of view:
https://lists.gnu.org/archive/html/nano-devel/2016-01/msg00043.html

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
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>
Project AdministratorIn charge of this item.
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>
Project AdministratorIn charge of this item.

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 13 Feb 2016 10:35:07 AM UTCbensOpen/ClosedOpen=>Closed
    Wed 20 Jan 2016 04:18:15 PM UTCbensStatusIn Progress=>Fixed
    Thu 14 Jan 2016 05:07:43 PM UTCbensStatusNone=>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.1-cleanup1