summaryrefslogtreecommitdiff
path: root/coreutils
diff options
context:
space:
mode:
authorDenys Vlasenko2021-04-13 15:49:06 +0200
committerDenys Vlasenko2021-04-13 15:49:06 +0200
commit9c210f0efb1959895df237a96210a73253b5b9ed (patch)
tree80f800d0270b1838edbe1bed029ec05ab3acc8a3 /coreutils
parent6b6ff80299cd840849532405b4ca758ce44089f5 (diff)
downloadbusybox-9c210f0efb1959895df237a96210a73253b5b9ed.zip
busybox-9c210f0efb1959895df237a96210a73253b5b9ed.tar.gz
touch: fix previous commit
function old new delta touch_main 423 414 -9 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'coreutils')
-rw-r--r--coreutils/touch.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/coreutils/touch.c b/coreutils/touch.c
index 3554553..6c02013 100644
--- a/coreutils/touch.c
+++ b/coreutils/touch.c
@@ -173,7 +173,7 @@ int touch_main(int argc UNUSED_PARAM, char **argv)
/* Try to create the file */
fd = open(*argv, O_RDWR | O_CREAT, 0666);
if (fd >= 0) {
- if (reference_file || date_str)
+ if (opts & (OPT_r|OPT_d|OPT_t))
futimens(fd, timebuf);
xclose(fd);
continue;