canonicalizePathMetaData: Fall-back to utimes if lutimes fails due to ENOSYS
This commit is contained in:
parent
4c34d384e6
commit
d0fc615af6
1 changed files with 2 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue