*
* Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org>
*
- * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
+ * Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
/* BB_AUDIT SUSv3 _NOT_ compliant -- options -a, -m, -r, -t not supported. */
}
do {
- if (utimes(*argv, reference_file ? timebuf : NULL) != 0) {
+ if (utimes(*argv, (reference_file || date_str) ? timebuf : NULL) != 0) {
if (errno == ENOENT) { /* no such file */
if (opts) { /* creation is disabled, so ignore */
continue;
fd = open(*argv, O_RDWR | O_CREAT, 0666);
if (fd >= 0) {
xclose(fd);
- if (reference_file)
+ if (reference_file || date_str)
utimes(*argv, timebuf);
continue;
}