Ignore a time-setting error on a symlink (which is only attempted

on a system with lutimes() anyway).
This commit is contained in:
Wayne Davison committed 2006-11-12 21:18:26 +00:00
1 parent 88897638a9
commit 149a78e33f
1 file changed
+4 -2
+4 -2
View File
@@ -145,8 +145,10 @@ int set_modtime(char *fname, time_t modtime, mode_t mode)
t[1].tv_sec = modtime;
t[1].tv_usec = 0;
# ifdef HAVE_LUTIMES
if (S_ISLNK(mode))
return lutimes(fname, t);
if (S_ISLNK(mode)) {
lutimes(fname, t);
return 0; /* ignore errors */
}
# endif
return utimes(fname, t);
#elif defined HAVE_UTIMBUF