aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkraai <kraai@69ca8d6d-28ef-0310-b511-8ec308f3f277>2001-12-07 21:27:38 +0000
committerkraai <kraai@69ca8d6d-28ef-0310-b511-8ec308f3f277>2001-12-07 21:27:38 +0000
commit2f1854a25dfd1450ccd1f5c95115437a5b41ddd1 (patch)
tree6ee93814d63dd27463b33af9c8a2c1cde38abce3
parent1dd8843de16ac40d6e2303fa1477c27043a8d567 (diff)
downloadbusybox-w32-2f1854a25dfd1450ccd1f5c95115437a5b41ddd1.tar.gz
busybox-w32-2f1854a25dfd1450ccd1f5c95115437a5b41ddd1.tar.bz2
busybox-w32-2f1854a25dfd1450ccd1f5c95115437a5b41ddd1.zip
Continue processing files if we are asked to touch, but not create, a file
which doesn't exist. git-svn-id: svn://busybox.net/trunk/busybox@3867 69ca8d6d-28ef-0310-b511-8ec308f3f277
-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 }