canonicalizePathMetaData: Fall-back to utimes if lutimes fails due to ENOSYS
This commit is contained in:
@@ -507,6 +507,8 @@ void canonicalisePathMetaData(const Path & path, bool recurse)
|
||||
times[1].tv_usec = 0;
|
||||
#if HAVE_LUTIMES
|
||||
if (lutimes(path.c_str(), times) == -1)
|
||||
if (errno != ENOSYS ||
|
||||
(!S_ISLNK(st.st_mode) && utimes(path.c_str(), times) == -1))
|
||||
#else
|
||||
if (!S_ISLNK(st.st_mode) && utimes(path.c_str(), times) == -1)
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user