files: avoid a warning about not being able to write a lockfile

Instead be more specific and say that the directory is not writable.
master
Benno Schulenberg 2016-05-23 16:24:12 +02:00
parent 86a64b1bb5
commit 6c16744292
1 changed files with 2 additions and 0 deletions

View File

@ -51,6 +51,8 @@ bool has_valid_path(const char *filename)
statusline(ALERT, _("Path '%s' is not a directory"), parentdir);
else if (access(parentdir, X_OK) == -1)
statusline(ALERT, _("Path '%s' is not accessible"), parentdir);
else if (ISSET(LOCKING) && access(parentdir, W_OK) == -1)
statusline(MILD, _("Directory '%s' is not writable"), parentdir);
else
validity = TRUE;