Skip to content

Fix utime sometimes failing #1826

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Fix utime sometimes failing #1826

wants to merge 1 commit into from

Conversation

JxxIT
Copy link

@JxxIT JxxIT commented Apr 5, 2025

Fixes that sometimes the date doesn't get changed.

For those interested, here's the investigation process:
I noticed that a process called getattrlist read and wrote to the file. Within less than 1 ms, the date changed.
getattrlist is an underlying component of Spotlight/MacOS that caches metadata. When the F_NOCACHE flag is added, MacOS no longer caches this information, resolving the issue.

Fixes #1820

@RhetTbull
Copy link
Owner

@all-contributors please add @JxxIT for bug, code

@RhetTbull
Copy link
Owner

Thanks for this! Unfortunately GitHub has done something to the macOS runners that is causing all tests to fail. I will hold on merging this until I can get tests figured out.

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.

Touching files not working when writing to NAS
2 participants