From 6c1674429257859d469d5c5aa82acdc7b35f4e70 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Mon, 23 May 2016 16:24:12 +0200 Subject: [PATCH] files: avoid a warning about not being able to write a lockfile Instead be more specific and say that the directory is not writable. --- src/files.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/files.c b/src/files.c index a9ca3256..5a137f07 100644 --- a/src/files.c +++ b/src/files.c @@ -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;