summaryrefslogtreecommitdiff
path: root/usr.bin/mg/dir.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/mg/dir.c')
-rw-r--r--usr.bin/mg/dir.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/usr.bin/mg/dir.c b/usr.bin/mg/dir.c
index 2d5b8607a6a..ab4b4128fea 100644
--- a/usr.bin/mg/dir.c
+++ b/usr.bin/mg/dir.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dir.c,v 1.24 2013/10/21 19:04:56 florian Exp $ */
+/* $OpenBSD: dir.c,v 1.25 2014/03/20 07:47:29 lum Exp $ */
/* This file is in the public domain. */
@@ -47,6 +47,7 @@ changedir(int f, int n)
return (FALSE);
/* Append trailing slash */
if (chdir(bufc) == -1) {
+ dobeep();
ewprintf("Can't change dir to %s", bufc);
return (FALSE);
}
@@ -125,6 +126,7 @@ do_makedir(void)
ishere = !stat(path, &sb);
if (finished && ishere) {
+ dobeep();
ewprintf("Cannot create directory %s: file exists",
path);
return(FALSE);
@@ -140,10 +142,11 @@ do_makedir(void)
}
} else {
if (!ishere || !S_ISDIR(sb.st_mode)) {
- if (!ishere)
+ if (!ishere) {
+ dobeep();
ewprintf("Creating directory: "
"permission denied, %s", path);
- else
+ } else
eerase();
umask(oumask);