aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--toys/touch.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/toys/touch.c b/toys/touch.c
index 0b5b2276..b4e3d971 100644
--- a/toys/touch.c
+++ b/toys/touch.c
@@ -62,14 +62,11 @@ err:
if (stat(arg, &sb) == -1) {
if (create && errno == ENOENT) {
- if (creat(arg, O_RDWR))
+ if (creat(arg, 0644))
goto error;
if (stat(arg, &sb))
goto error;
}
- } else {
-error:
- perror_exit(arg);
}
if ((set_a+set_m) == 1) {