Index: src/files.c =================================================================== --- src/files.c (revision 5595) +++ src/files.c (working copy) @@ -38,17 +38,29 @@ { char *parentdir; struct stat parentinfo; - bool validity = TRUE; + bool validity = FALSE; if (strrchr(filename, '/') == NULL) parentdir = mallocstrcpy(NULL, "."); else parentdir = dirname(mallocstrcpy(NULL, filename)); - if (stat(parentdir, &parentinfo) == -1 || !S_ISDIR(parentinfo.st_mode)) { - statusbar(_("Directory '%s' does not exist"), parentdir); - validity = FALSE; + if (stat(parentdir, &parentinfo) == -1) { + if (errno == ENOENT) + statusbar(_("Path '%s' does not exist"), parentdir); + else + statusbar(_("Path '%s': %s"), parentdir, strerror(errno)); beep(); + } else if (!S_ISDIR(parentinfo.st_mode)) { + statusbar(_("Path '%s' is not a directory"), parentdir); + beep(); + } else { + if (access(parentdir, X_OK) != -1) + validity = TRUE; + else { + statusbar(_("Path '%s' is not accessible"), parentdir); + beep(); + } } free(parentdir);