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

Fix a ctime fastcheck miss #941

Merged
merged 1 commit into from
Jul 5, 2023
Merged

Conversation

tleedjarv
Copy link
Contributor

Here we go again. After having fixed mtime fastcheck in #769 I went ahead and introduced the exact same bug with ctime. Sigh.

Some more details in the commit message but this is pretty much the same story as with #769 (except that it is exposed with preferences for extended props, like "xattrs" and "acl").

There is a bug when using ctime for fastcheck, not unlike the bug with
mtime fixed by commit e2ac124.

The cause of the issue is similar to the one described in the
abovementioned commit. There is a problem when rescanning the extended
properties (like xattrs) of previously synced files (for example, when
changing the "xattrs" preference from false to true, which causes a
one-time rescan of all properties). If new extended properties are
detected but the file is eventually not synced (due to an error, or the
user actively skipping the file), these extended properties are no
longer detected on the next update check because the ctime in the
archive matches the ctime on disk and a complete rescan is this time not
requested (as it was a one-time rescan).

This patch fixes the bug by always resetting the ctime in the archive
when a one-time rescan is requested and new extended properties are
detected. Resetting the ctime in the archive guarantees that the
extended properties for the file are rescanned every time until they are
either successfully synced or the user preferences change (for example,
the "xattrs" preference is set to false again).
@gdt gdt merged commit 88be4e1 into bcpierce00:master Jul 5, 2023
@tleedjarv tleedjarv deleted the fix-ctime-bug branch July 5, 2023 15:06
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