Skip to content

Commit

Permalink
Purge uidCache after rm file (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
ron-damon authored Apr 22, 2021
1 parent 6b4b7d5 commit 514748f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/sync/pull.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 514748f

Please sign in to comment.