From: lum Date: Fri, 5 Mar 2021 16:16:53 +0000 (+0000) Subject: If there is a problem with opening a directory via M-x dired, let the X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=e0cb1f60ff74f0741b445c2f3ed153a2ede8ccd5;p=openbsd 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. --- 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); }