Skip to content

Commit 130ac46

Browse files
Merge branch 'stable31' into backport/58562/stable31
Signed-off-by: Cristian Scheid <74515775+cristianscheid@users.noreply.github.com>
2 parents c60477a + 1bdc3c2 commit 130ac46

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/private/Files/View.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -937,7 +937,7 @@ public function copy($source, $target, $preserveMtime = false) {
937937

938938
try {
939939
$exists = $this->file_exists($target);
940-
if ($this->shouldEmitHooks($target)) {
940+
if ($this->shouldEmitHooks($source) && $this->shouldEmitHooks($target)) {
941941
\OC_Hook::emit(
942942
Filesystem::CLASSNAME,
943943
Filesystem::signal_copy,
@@ -977,7 +977,7 @@ public function copy($source, $target, $preserveMtime = false) {
977977
$this->changeLock($target, ILockingProvider::LOCK_SHARED);
978978
$lockTypePath2 = ILockingProvider::LOCK_SHARED;
979979

980-
if ($this->shouldEmitHooks($target) && $result !== false) {
980+
if ($this->shouldEmitHooks($source) && $this->shouldEmitHooks($target) && $result !== false) {
981981
\OC_Hook::emit(
982982
Filesystem::CLASSNAME,
983983
Filesystem::signal_post_copy,

0 commit comments

Comments
 (0)