diff options
-rw-r--r-- | coreutils/touch.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/coreutils/touch.c b/coreutils/touch.c index 355455363..6c0201374 100644 --- a/coreutils/touch.c +++ b/coreutils/touch.c | |||
@@ -173,7 +173,7 @@ int touch_main(int argc UNUSED_PARAM, char **argv) | |||
173 | /* Try to create the file */ | 173 | /* Try to create the file */ |
174 | fd = open(*argv, O_RDWR | O_CREAT, 0666); | 174 | fd = open(*argv, O_RDWR | O_CREAT, 0666); |
175 | if (fd >= 0) { | 175 | if (fd >= 0) { |
176 | if (reference_file || date_str) | 176 | if (opts & (OPT_r|OPT_d|OPT_t)) |
177 | futimens(fd, timebuf); | 177 | futimens(fd, timebuf); |
178 | xclose(fd); | 178 | xclose(fd); |
179 | continue; | 179 | continue; |