mirror of
https://github.com/nextcloud/server.git
synced 2026-04-15 22:11:17 -04:00
fix: check source and target when emitting copy event
Signed-off-by: Salvatore Martire <4652631+salmart-dev@users.noreply.github.com>
This commit is contained in:
parent
ebf9596365
commit
da0a830500
1 changed files with 2 additions and 2 deletions
|
|
@ -939,7 +939,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,
|
||||
|
|
@ -979,7 +979,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,
|
||||
|
|
|
|||
Loading…
Reference in a new issue