Repository navigation
K2GO-591 fix(clone): mark the library damaged only after the first write - #818
Merged
Merged
Conversation
A receive that failed at the file list (for example on an old pairing code) left DAMAGED:CLONE on an intact library. The marker now comes with the first write.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes
files/.install_in_progress) at the first write into the library, not when the user taps "start copying".ChunkedPullcalls a newSyncListener.onWriteStarting()after the dry-run file list and before the first chunk. The call andstop()use the same lock: afterstop()returns, the call has finished or will not come.CloneFragmentwrites the marker inonWriteStarting(). On cancel it reads the marker from the disk, like the rebind and terminal paths do.Why
A receive that failed at the file list (for example on an old pairing code: rsync exit 5) changed the marker to
DAMAGED:CLONEon an intact library. The next start showed "Copy interrupted ... the system can't start". The marker on the disk stays the one source; the CLONE environment lock keeps the server stopped during the file list, as before.Steps to QA
Baseline (main e3fd1cc), sender OnePlus 7T, receiver Samsung A16, same Wi-Fi:
DAMAGED:CLONE, cold start shows "Copy interrupted".Change, the same steps:
DAMAGED:CLONEand "Copy interrupted" (K2GO-562 unchanged). "Retry the copy" finishes and clears the marker.Verifications
assembleStandardDebug,testStandardDebugUnitTest) pass.Notes
No new strings, no UI change.