fix(files): Correctly copy the cache information on copy operations
Needed to copy the encrypted flag of encrypted files when those files are two level down in a moved folder.
Reproduction steps of the issue:
- Set up the following folder structure
/A/B/t.txt/C
- Copy
AinC t.txtis encrypted but does not have theencryptedflag set totrue, and therefore not readable.
With this PR, t.txt is readable.
Note: Open to better ways to share code between the two methods.
This might help with #48174.
Snap, the ObjectStoreStorage does the cache copy inside the storage copy, so the final cache copy creates another filecache entry.
https://github.com/nextcloud/server/blob/6a0e11783f6fc921a1e6569f72b6dd864d6189cc/lib/private/Files/ObjectStore/ObjectStoreStorage.php#L699-L700
Edit: maybe this part can be improved: https://github.com/nextcloud/server/blob/6a0e11783f6fc921a1e6569f72b6dd864d6189cc/lib/private/Files/Cache/Updater.php#L203-L206
This introduced a regression for some cross-storage moves, see https://github.com/nextcloud/server/pull/49695
hello, was this backported to 29/30? Would you mind helping me with the links?
hello, was this backported to 29/30? Would you mind helping me with the links?
No, it was not.
/backport to stable30
/backport to stable29