]> git.proxmox.com Git - pmg-api.git/blobdiff - PMG/Cluster.pm
fix bug #1636: correctly track file modification time
[pmg-api.git] / PMG / Cluster.pm
index 2693bfd2c16a69d4423e39c2b766d5520ca6e2d2..5d7d29c6e78538c3a1289730654bbe8d00691fad 100644 (file)
@@ -268,6 +268,9 @@ my $cond_commit_synced_file = sub {
        return 0 if $new eq $old;
     }
 
+    # set mtime (touch) to avoid time drift problems
+    utime(undef, undef, $srcfn);
+
     rename($srcfn, $dstfn) ||
        die "cond_rename_file '$filename' failed - $!\n";