Skip to content

Commit 514748f

Browse files
authored
Purge uidCache after rm file (#14)
1 parent 6b4b7d5 commit 514748f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

pkg/sync/pull.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -383,6 +383,12 @@ func (self *Puller) Pull() string {
383383
// delete files not exist in remote source
384384
for f, _ := range self.filesToDelete {
385385
os.Remove(f)
386+
uidKey, err := uidKeyFromLocalPath(self.LocalDir, f)
387+
if err == nil {
388+
self.uidLock.Lock()
389+
delete(self.uidCache, uidKey)
390+
self.uidLock.Unlock()
391+
}
386392
}
387393

388394
return pullErrMsg

0 commit comments

Comments
 (0)