about summary refs log tree commit diff
path: root/src/libstore/local-store.cc
diff options
context:
space:
mode:
authorShea Levy <shea@shealevy.com>2012-11-06T04·00-0500
committerEelco Dolstra <eelco.dolstra@logicblox.com>2012-11-06T10·29+0100
commitd0fc615af658cb83e858b3c3c5e0d4c6c539ad66 (patch)
tree8c346f31ea44cfe7611f77d7bd740968e93ad953 /src/libstore/local-store.cc
parent4c34d384e68ce7e2c949a7588d80bbe7d5a96440 (diff)
canonicalizePathMetaData: Fall-back to utimes if lutimes fails due to ENOSYS
Diffstat (limited to 'src/libstore/local-store.cc')
-rw-r--r--src/libstore/local-store.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libstore/local-store.cc b/src/libstore/local-store.cc
index 7fa278a91e..b82c03f59b 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