diff options
author | Shea Levy <shea@shealevy.com> | 2012-11-05 23:00:21 -0500 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2012-11-06 11:29:59 +0100 |
commit | d0fc615af658cb83e858b3c3c5e0d4c6c539ad66 (patch) | |
tree | 8c346f31ea44cfe7611f77d7bd740968e93ad953 /src | |
parent | 4c34d384e68ce7e2c949a7588d80bbe7d5a96440 (diff) |
canonicalizePathMetaData: Fall-back to utimes if lutimes fails due to ENOSYS
Diffstat (limited to 'src')
-rw-r--r-- | src/libstore/local-store.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libstore/local-store.cc b/src/libstore/local-store.cc index 7fa278a91..b82c03f59 100644 --- a/src/libstore/local-store.cc +++ b/src/libstore/local-store.cc @@ -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 |