Skip to content

Conversation

@imsodin
Copy link
Member

@imsodin imsodin commented Nov 25, 2020

The problem in #7152 is the trailer we add to the file containing the encrypted file info and the connected file size change: We adjust that when actually pulling the file. On index retransfer, we get a new global file, as the version always changes when encrypting a file info. That triggers a pull, but as the contents didn't change, that can be shortcutted. In the shortcut we do not adjust the filesize. So on next scan, the scanner notices the changed file size and thus the file gets marked as locally changed.

Now the file size adjustment happens in the db updater routine of the puller, not in the shared puller state.

@calmh
Copy link
Member

calmh commented Nov 25, 2020

Excellent detective work

@calmh calmh merged commit bf7d03d into syncthing:main Nov 25, 2020
@imsodin imsodin deleted the model/pullEncFileSize branch November 25, 2020 22:01
@calmh calmh added this to the v1.12.1 milestone Nov 27, 2020
@st-review st-review added the frozen-due-to-age Issues closed and untouched for a long time, together with being locked for discussion label Nov 26, 2021
@syncthing syncthing locked and limited conversation to collaborators Nov 26, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

frozen-due-to-age Issues closed and untouched for a long time, together with being locked for discussion

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants