Purge uidCache after rm file (#14)

This commit is contained in:
ron-damon 2021-04-22 20:29:52 -03:00 committed by GitHub
parent 6b4b7d5389
commit 514748f568
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -383,6 +383,12 @@ func (self *Puller) Pull() string {
// delete files not exist in remote source
for f, _ := range self.filesToDelete {
os.Remove(f)
uidKey, err := uidKeyFromLocalPath(self.LocalDir, f)
if err == nil {
self.uidLock.Lock()
delete(self.uidCache, uidKey)
self.uidLock.Unlock()
}
}
return pullErrMsg