Bug 707578, Package.pm shouldn't copy older files, r=khuey,rstrong

This commit is contained in:
Mounir Lamouri 2012-04-30 15:17:40 +12:00
parent 1881a31fe0
commit 4099aa1ab3

View File

@ -323,6 +323,15 @@ sub do_copyfile
print " copy\t$srcpath$srcname$srcsuffix =>\n\t\t$destpath$destname$destsuffix\n";
}
}
if (stat("$destpath$destname$destsuffix") &&
stat("$srcpath$srcname$srcsuffix")->mtime < stat("$destpath$destname$destsuffix")->mtime) {
if ( $debug >= 3 ) {
print "source file older than destination, do not copy\n";
}
return;
}
unlink("$destpath$destname$destsuffix") if ( -e "$destpath$destname$destsuffix");
# If source is a symbolic link pointing in the same directory, create a
# symbolic link