From f7edd369312d6ec50505533d62cd82d89d1e7828 Mon Sep 17 00:00:00 2001 From: AudriusButkevicius Date: Thu, 12 Nov 2015 02:13:06 +0000 Subject: [PATCH] Use virtualMtime when deciding if a file is up to date --- lib/model/rwfolder.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/model/rwfolder.go b/lib/model/rwfolder.go index 3cbd191e4..2791e66a4 100644 --- a/lib/model/rwfolder.go +++ b/lib/model/rwfolder.go @@ -948,7 +948,8 @@ func (p *rwFolder) handleFile(file protocol.FileInfo, copyChan chan<- copyBlocks // changes that we don't know about yet and we should scan before // touching the file. If we can't stat the file we'll just pull it. if info, err := osutil.Lstat(realName); err == nil { - if info.ModTime().Unix() != curFile.Modified || info.Size() != curFile.Size() { + mtime := p.virtualMtimeRepo.GetMtime(file.Name, info.ModTime()) + if mtime.Unix() != curFile.Modified || info.Size() != curFile.Size() { l.Debugln("file modified but not rescanned; not pulling:", realName) // Scan() is synchronous (i.e. blocks until the scan is // completed and returns an error), but a scan can't happen