summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlum <lum@openbsd.org>2021-03-05 16:16:53 +0000
committerlum <lum@openbsd.org>2021-03-05 16:16:53 +0000
commite0cb1f60ff74f0741b445c2f3ed153a2ede8ccd5 (patch)
tree04d58b3a63fc34e2137f9bdb2aa92272e46318e5
parentFactor out the SHA256 hash checks into valid_filehash() so that it can (diff)
downloadwireguard-openbsd-e0cb1f60ff74f0741b445c2f3ed153a2ede8ccd5.tar.xz
wireguard-openbsd-e0cb1f60ff74f0741b445c2f3ed153a2ede8ccd5.zip
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.
-rw-r--r--usr.bin/mg/dired.c7
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);
}