startup: check that a backup directory is valid also when backups are off
When the user switches backups on later (with M-B in the ^O menu),
the specified folder should have been checked for validity.
This fixes https://savannah.gnu.org/bugs/?55423.
Bug existed since the check for a valid backup directory was introduced
in version 2.8.7, commit 751e7f0f
.
master
parent
0ae80ce362
commit
e1a6f58da6
|
@ -2449,9 +2449,9 @@ int main(int argc, char **argv)
|
|||
#endif /* ENABLE_HISTORIES */
|
||||
|
||||
#ifndef NANO_TINY
|
||||
/* If backups are enabled and a backup directory was specified, make sure
|
||||
* the path exists and is a folder, so backup files can be saved there. */
|
||||
if (ISSET(BACKUP_FILE) && backup_dir != NULL)
|
||||
/* If a backup directory was specified and we're not in restricted mode,
|
||||
* verify it is an existing folder, so backup files can be saved there. */
|
||||
if (backup_dir != NULL && !ISSET(RESTRICTED))
|
||||
init_backup_dir();
|
||||
#endif
|
||||
#ifdef ENABLE_OPERATINGDIR
|
||||
|
|
Loading…
Reference in New Issue