One more fix in set_modtime() when we get ENOSYS on a symlink.
authorWayne Davison <wayned@samba.org>
Sun, 10 Feb 2008 23:39:21 +0000 (15:39 -0800)
committerWayne Davison <wayned@samba.org>
Sun, 10 Feb 2008 23:39:21 +0000 (15:39 -0800)
util.c

diff --git a/util.c b/util.c
index 477f5bc..5dd6ead 100644 (file)
--- a/util.c
+++ b/util.c
@@ -147,8 +147,8 @@ int set_modtime(const char *fname, time_t modtime, mode_t mode)
                t[1].tv_usec = 0;
 # ifdef HAVE_LUTIMES
                if (S_ISLNK(mode)) {
-                       if (lutimes(fname, t) < 0 && errno != ENOSYS)
-                               return -1;
+                       if (lutimes(fname, t) < 0)
+                               return errno == ENOSYS ? 1 : -1;
                        return 0;
                }
 # endif