mirror of
https://github.com/Luzifer/cloudbox.git
synced 2024-11-08 14:10:09 +00:00
Handle special case: Both sides deleted
This commit is contained in:
parent
b14ed6052f
commit
d65571a245
1 changed files with 10 additions and 1 deletions
|
@ -26,7 +26,16 @@ func (s *Sync) decideAction(syncState *state, fileName string) error {
|
|||
case change.HasAll(ChangeLocalDelete, ChangeRemoteDelete):
|
||||
// Special case: Both vanished, we just need to clean up the sync cache
|
||||
logger.Debug("File deleted locally as well as remotely")
|
||||
// TODO: Handle special case
|
||||
|
||||
if err := s.deleteDBFileInfo(sideLocal, fileName); err != nil {
|
||||
logger.WithError(err).Error("Unable to delete local file info")
|
||||
return nil
|
||||
}
|
||||
|
||||
if err := s.deleteDBFileInfo(sideRemote, fileName); err != nil {
|
||||
logger.WithError(err).Error("Unable to delete remote file info")
|
||||
return nil
|
||||
}
|
||||
|
||||
case change.Is(ChangeLocalAdd) || change.Is(ChangeLocalUpdate):
|
||||
logger.Debug("File added or changed locally, uploading...")
|
||||
|
|
Loading…
Reference in a new issue