On remote file update, FUSE will not read new content if file size stayed the same

26 views
Skip to first unread message

mixtly

unread,
Nov 7, 2017, 12:45:10 PM11/7/17
to OSXFUSE
A problem I'm running into:

1. Let there be a local file 'file.txt' with content 'v1'
2. Now let someone remotely modify the file so that content is now 'v2'

My SyncEngine detects this change, downloads the file and VFS file points to the proper downloaded file on disk. However, macOS will not read the new file, but will always return the (probably cached) content of an old file, so even though modif date is changed, 'v1' is returned as file content instead of 'v2'.
If a file size gets changed then expected 'v2' content is returned.

Did anyone run into similar issues?
Is there a (high-level API) way to tell the OS that it should READ the new file content. OS invokes 'openFileAtPath' but doesn't invoke 'readFileAtPath' unless file size has changed?
Reply all
Reply to author
Forward
0 new messages