Bind audio cache reuse to remote identity
This commit is contained in:
@@ -430,33 +430,15 @@ func classifyRestoreAction(
|
||||
}
|
||||
|
||||
if restoreRelativePathIsAudio(localRelPath) {
|
||||
if object.Size > 0 {
|
||||
if info.Size() == object.Size {
|
||||
action.Kind = RestoreActionSkipSame
|
||||
action.SameLocal = true
|
||||
action.Reason = "local audio size matches remote content"
|
||||
return action, nil
|
||||
}
|
||||
if force {
|
||||
action.Kind = RestoreActionDownload
|
||||
action.Reason = "local audio differs (size mismatch); overwrite with --force"
|
||||
return action, nil
|
||||
}
|
||||
action.Kind = RestoreActionConflict
|
||||
action.Conflict = true
|
||||
action.ConflictKind = RestoreConflictContentMismatch
|
||||
action.Reason = "local audio differs (size mismatch)"
|
||||
return action, nil
|
||||
}
|
||||
if force {
|
||||
action.Kind = RestoreActionDownload
|
||||
action.Reason = "local audio exists; remote size unavailable; overwrite with --force"
|
||||
action.Reason = "local audio identity requires verified replacement; overwrite with --force"
|
||||
return action, nil
|
||||
}
|
||||
action.Kind = RestoreActionConflict
|
||||
action.Conflict = true
|
||||
action.ConflictKind = RestoreConflictContentMismatch
|
||||
action.Reason = "local audio exists; remote size unavailable"
|
||||
action.Reason = "local audio identity is not verified; use --force to replace it"
|
||||
return action, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user