summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--metastore.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/metastore.c b/metastore.c
index 4408cda..25890d1 100644
--- a/metastore.c
+++ b/metastore.c
@@ -157,10 +157,12 @@ compare_fix(struct metaentry *real, struct metaentry *stored, int cmp)
msg(MSG_DEBUG, "\tchmod failed: %s\n", strerror(errno));
}
- if (cmp & DIFF_MTIME) {
+ /* FIXME: Use utimensat here, or even better - lutimensat */
+ if ((cmp & DIFF_MTIME) && S_ISLNK(real->mode)) {
+ msg(MSG_NORMAL, "%s:\tsymlink, not changing mtime", real-path);
+ } else if (cmp & DIFF_MTIME) {
msg(MSG_NORMAL, "%s:\tchanging mtime from %ld to %ld\n",
real->path, real->mtime, stored->mtime);
- /* FIXME: Use utimensat here */
tbuf.actime = stored->mtime;
tbuf.modtime = stored->mtime;
if (utime(real->path, &tbuf)) {