Merge pull request #58660 from nextcloud/fix/chunked-uploads-on-shared-folders

fix: check source and target when emitting copy event
This commit is contained in:
Andy Scherzinger 2026-03-02 16:50:33 +01:00 committed by GitHub
commit 0e6c8ec73f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -950,7 +950,7 @@ class View {
try {
$exists = $this->file_exists($target);
if ($this->shouldEmitHooks($target)) {
if ($this->shouldEmitHooks($source) && $this->shouldEmitHooks($target)) {
\OC_Hook::emit(
Filesystem::CLASSNAME,
Filesystem::signal_copy,
@ -990,7 +990,7 @@ class View {
$this->changeLock($target, ILockingProvider::LOCK_SHARED);
$lockTypePath2 = ILockingProvider::LOCK_SHARED;
if ($this->shouldEmitHooks($target) && $result !== false) {
if ($this->shouldEmitHooks($source) && $this->shouldEmitHooks($target) && $result !== false) {
\OC_Hook::emit(
Filesystem::CLASSNAME,
Filesystem::signal_post_copy,