Skip to content

Conversation

@susnux
Copy link
Contributor

@susnux susnux commented Apr 17, 2024

  • Resolves:

Summary

When a file is moved between different storages then the file id is not (always) preserved. This means the file id has to be adjusted for all shares.

So in case the file id does not exist anymore we try to find the new file id based on the target path of the transfer and the path suffix of the share.

Checklist

@susnux susnux added this to the Nextcloud 30 milestone Apr 17, 2024
@susnux
Copy link
Contributor Author

susnux commented Apr 17, 2024

Background information:

Currently our file system does not support moving files between storages, so we need to hack this here.
Maybe we can adjust the storage code (especially OCP\Files\Storage\Common::moveFromStorage) so that at least the file ID in the file cache is preserved (idea: swap the rows in the database and then remove the "new" id with the old location).

@susnux susnux force-pushed the fix/transfer-ownership branch from 3a26dda to e2a3144 Compare April 17, 2024 20:38
@susnux
Copy link
Contributor Author

susnux commented Apr 17, 2024

/backport to stable29

@susnux
Copy link
Contributor Author

susnux commented Apr 17, 2024

/backport to stable28

@susnux
Copy link
Contributor Author

susnux commented Apr 17, 2024

/backport to stable27

…torage

When a file is moved between different storages then the file id is not (always) preserved.
This means the file id has to be adjusted for all shares.

So in case the file id does not exist anymore we try to find the new file id based on the
target path of the transfer and the path suffix of the share.

Signed-off-by: Ferdinand Thiessen <[email protected]>
@susnux susnux force-pushed the fix/transfer-ownership branch from e2a3144 to 38f4451 Compare April 18, 2024 11:51
Copy link
Contributor

@artonge artonge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Band-aid, but should works 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants