You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
posix: files in a folder renamed on disk can't be found by id #855
With the posix driver and the watcher on, rename a folder on disk. Afterwards, the files inside it can't be found by id. Shares, public links, favourites and fileid URLs that point at those files fail until someone opens the folder in OpenCloud or the service restarts.
It only affects folders that a scan already passed, which after a restart is every existing folder.
Steps to reproduce
Start OpenCloud with a posixfs space and the watcher on. Create a folder a with a file a/f.txt, and create a public link to a/f.txt.
Restart, so the startup scan marks every folder as clean.
Run mv a b on disk.
Open the public link.
Expected: the link shows the file.
Actual: the link fails, because the id cache has no path for the file. A fileid URL or a share to the file fails the same way.
Cause
After a move, assimilate updates the cached paths of the children with WarmupIDCache(item.Path, false, true). With onlyDirty set the walk skips clean folders. A folder moved on disk is not marked dirty, so the walk skips it and never reaches the children. Tree.Move walks in full (onlyDirty=false) for moves through the API.
Activity