summaryrefslogtreecommitdiff
path: root/src/touch.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2004-09-07 06:21:46 +0000
committerPaul Eggert <eggert@cs.ucla.edu>2004-09-07 06:21:46 +0000
commitf786a91cd30d9cf60e6ccfb64a6678fd51ee9b5c (patch)
tree8cbe237d94eec85029f5651e20a4f1f5c6d0baab /src/touch.c
parentd1d35fc72977cd4997ca6ad8628229003e22200d (diff)
downloadcoreutils-f786a91cd30d9cf60e6ccfb64a6678fd51ee9b5c.tar.xz
(main): Fix POSIX-conformance bug: "touch --
MMDDhhmm file" must be treated like "touch MMDDhhmm file" when conforming to pre-2001 POSIX.
Diffstat (limited to 'src/touch.c')
-rw-r--r--src/touch.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/touch.c b/src/touch.c
index 6b4c19090..c3575f754 100644
--- a/src/touch.c
+++ b/src/touch.c
@@ -373,8 +373,7 @@ main (int argc, char **argv)
/* The obsolete `MMDDhhmm[YY]' form is valid IFF there are
two or more non-option arguments. */
- if (!date_set && 2 <= argc - optind && !STREQ (argv[optind - 1], "--")
- && posix2_version () < 200112)
+ if (!date_set && 2 <= argc - optind && posix2_version () < 200112)
{
if (posixtime (&newtime[0].tv_sec, argv[optind], PDS_TRAILING_YEAR))
{