fix: check source and target when emitting copy event#58660
fix: check source and target when emitting copy event#58660AndyScherzinger merged 1 commit intomasterfrom
Conversation
Signed-off-by: Salvatore Martire <4652631+salmart-dev@users.noreply.github.com>
come-nc
left a comment
There was a problem hiding this comment.
I think your fix makes sense.
The Node API does not support files outside of files/ folder anyway (and that’s what we are moving towards, events are supposed to be replaced by events, using nodes).
It was always a grey area for me when source is in files and not target (or the opposite) what should happen.
|
/backport to stable33 |
|
/backport to stable32 |
|
/backport to stable31 |
|
/backport to stable30 |
|
The backport to # Switch to the target branch and update it
git checkout stable30
git pull origin stable30
# Create the new backport branch
git checkout -b backport/58660/stable30
# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts, resolve them
git cherry-pick 8431abff
# Push the cherry pick commit to the remote repository and open a pull request
git push origin backport/58660/stable30Error: Failed to push branch backport/58660/stable30: remote: Invalid username or token. Password authentication is not supported for Git operations. Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports. |
Summary
Fixes an issue when updating files using the
ChunkingV2Pluginplugin if the source file and the destination file reside on different storages.The issue appeared since #52996. After that PR we attempt emitting an FS
copyevent hook where the source path resolves tonullsince its absolute path is not in/USER/filesbut in/USER/uploads. Since the plugin already takes care of emitting the update event, the copy one should probably be skipped.The bug causes the following exception:
Checklist
3. to review, feature component)stable32)AI (if applicable)