diff options
author | Mark Lumsden <lum@cvs.openbsd.org> | 2021-03-05 16:16:54 +0000 |
---|---|---|
committer | Mark Lumsden <lum@cvs.openbsd.org> | 2021-03-05 16:16:54 +0000 |
commit | a935040f82f6ab3b1b2c976c2cbe8bae1c36f9fc (patch) | |
tree | 8e1f1ac44b26e62dbfceef65e58c8fccbef34f5a /usr.bin/mg | |
parent | a9e32fcaaf997c2e822ed30650a9999076264c1c (diff) |
If there is a problem with opening a directory via M-x dired, let the
user know. EACCESS is currently accounted for, but nothing else.
Diffstat (limited to 'usr.bin/mg')
-rw-r--r-- | usr.bin/mg/dired.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.bin/mg/dired.c b/usr.bin/mg/dired.c index 7fa232c8904..3337cd4a028 100644 --- a/usr.bin/mg/dired.c +++ b/usr.bin/mg/dired.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dired.c,v 1.97 2021/03/01 10:51:14 lum Exp $ */ +/* $OpenBSD: dired.c,v 1.98 2021/03/05 16:16:53 lum Exp $ */ /* This file is in the public domain. */ @@ -243,7 +243,7 @@ dired(int f, int n) dname[0] = '\0'; } - if ((bufp = eread("Dired: ", dname, NFILEN, + if ((bufp = eread("Dired (directory): ", dname, NFILEN, EFDEF | EFNEW | EFCR)) == NULL) return (ABORT); if (bufp[0] == '\0') @@ -928,6 +928,9 @@ dired_(char *dname) if (errno == EACCES) { dobeep(); ewprintf("Permission denied: %s", dname); + } else { + dobeep(); + ewprintf("Error opening: %s", dname); } return (NULL); } |