aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--coreutils/touch.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/coreutils/touch.c b/coreutils/touch.c
index 267349596..3e2e600f3 100644
--- a/coreutils/touch.c
+++ b/coreutils/touch.c
@@ -56,9 +56,11 @@ extern int touch_main(int argc, char **argv)
56 fd = open(*argv, (create == FALSE) ? O_RDWR : O_RDWR | O_CREAT, 56 fd = open(*argv, (create == FALSE) ? O_RDWR : O_RDWR | O_CREAT,
57 S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH); 57 S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH);
58 if (fd < 0) { 58 if (fd < 0) {
59 if (create == FALSE && errno == ENOENT) 59 if (create == FALSE && errno == ENOENT) {
60 return EXIT_SUCCESS; 60 argc--;
61 else { 61 argv++;
62 continue;
63 } else {
62 perror_msg_and_die("%s", *argv); 64 perror_msg_and_die("%s", *argv);
63 } 65 }
64 } 66 }