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

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

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

Fixed in git, commit e1a6f58d.

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


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)

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

    Only logged-in users can vote.




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