Use copyLastModified() in Sync.scala

It turns out the code in Sync.scala activiely tries to transfer
the invalid modifed time of non-existent files in the source
directory over the time of the target file, which may or may
not exist. In case it exists, the modification time is set
to January 1, 1970. This is arguably a bug in Sync, which
should be adjusted to better handle mappings with source
files that do not exist. For now, however, we preserve the
current behavior, using the deprecated copyLastModified().
This commit is contained in:
Antonio Cunei 2017-12-13 15:09:52 +01:00 committed by Eugene Yokota
parent 295bcff851
commit 46d6b01f79
1 changed files with 1 additions and 1 deletions

View File

@ -66,7 +66,7 @@ object Sync {
else if (!target.exists) // we don't want to update the last modified time of an existing directory
{
IO.createDirectory(target)
IO.copyModifiedTime(source, target)
IO.copyLastModified(source, target)
}
def noDuplicateTargets(relation: Relation[File, File]): Unit = {