marsadm: use lamport clock as mtime of symbolic links

Fixes the following bug:
Symbolic links which are created in userspace get the current time
as mtime.
This commit is contained in:
Frank Liepold 2013-07-24 18:38:11 +02:00
parent c877c43eff
commit 2e441d0d11
1 changed files with 1 additions and 1 deletions

View File

@ -96,7 +96,7 @@ sub finish_links {
}
while (my $link = shift @link_list) {
my $link_tmp = to_tmp($link);
utime($timestamp, $timestamp, $link_tmp);
system("touch -h -d \"\@$timestamp\" $link_tmp") == 0 or ldie "cannot set mtime on symlink '$link_tmp'\n";
rename($link_tmp, $link) or ldie "cannot finalize symlink '$link'\n";
if ($verbose) {
my $target = readlink($link);