bugGNU nano - Bugs: bug #55423, the backup dir should be checked...

 
 

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

bug #55423: the backup dir should be checked for validity also when backups are not enabled

Submitter:  Benno Schulenberg <bens>
Submitted:  Tue 08 Jan 2019 06:54:44 PM UTC
   
 
Severity:  2 - Minor Status:  Fixed
Assigned to:  bens Open/Closed:  Closed

Thu 10 Jan 2019 07:40:22 PM UTC, comment #1: 

Fixed in git, commit e1a6f58d.

Benno Schulenberg <bens>
Group administrator
Tue 08 Jan 2019 06:54:44 PM UTC, original submission:  

To see what I mean, run:

  nano --ignore -B -CNEWS THANKS

Nano refuses to start: "Invalid backup directory: NEWS".  Good.
Now run the same command but without the -B:

  nano --ignore -CNEWS THANKS

Nano happily starts.
Now type: ^O M-B <Enter> ^X.
Then type: ls -l NEWS*
Instead of saving the backup file in a directory called NEWS, it has simply saved the backup file with a prefix of NEWS.  Not good.

Expected behavior: nano should reject any parameter of -C that is not a directory also when backups are not actually enabled at startup.

(Of course, things can still go wrong after startup, when a file with the same name as the backupdir appears, or the backupdir is created but is unwritable in some way, or...  But those are somewhat unlikely things.  The simple check for being an actual existing directory, however, will prevent most user mistakes.)

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 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-03-25 bens Open/ClosedOpen Closed
    2019-01-10 bens StatusNone Fixed

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code