Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve handling of temp files for diffing #1022

Merged
merged 2 commits into from
Apr 23, 2024

Conversation

tleedjarv
Copy link
Contributor

More details in commit messages. Essentially, fixing a (probably rare) bug and unifying the naming of temp files (with an additional benefit of auto-cleanup).

For purposes of running a local diff, a remote file is copied by the
same routines that are used fo the actual sync. This includes all checks
and verifications. Using "safe" dummy props (as is currently done) to
copy the remote file into a temporary file can in some cases trip those
checks. This mainly happens when permissions are influenced by
fs/storage setup or ACL inheritance, for example.

This patch sets the temporary file props to be the same as what the
local file already has. The hope is that setting these props would
succeed during a normal sync, so it should also work for the temporary
file.
The previous patches (almost 20 years ago) intending to do this didn't
quite finish the job. The added bonus with proper temp names is that
they will be included in the automatic cleanup, should they be left
behind for some reason.
@gdt gdt merged commit ba557e7 into bcpierce00:master Apr 23, 2024
29 checks passed
@tleedjarv tleedjarv deleted the fix-diff-files branch April 24, 2024 05:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants