diff options
author | Robin Appelman <robin@icewind.nl> | 2018-03-08 13:02:35 +0100 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2018-03-08 13:02:35 +0100 |
commit | f5ef9e02b2a74c6bd8da9863062a7ecaddf60b8b (patch) | |
tree | 9e2a2cfe04ee945f99706af1620e1ea140eb9c00 | |
parent | fc35352122f0bfd07627d8e1f4773950116eb7cd (diff) | |
download | nextcloud-server-f5ef9e02b2a74c6bd8da9863062a7ecaddf60b8b.tar.gz nextcloud-server-f5ef9e02b2a74c6bd8da9863062a7ecaddf60b8b.zip |
emit pre-hooks earlier when not using part files
Signed-off-by: Robin Appelman <robin@icewind.nl>
-rw-r--r-- | apps/dav/lib/Connector/Sabre/File.php | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/apps/dav/lib/Connector/Sabre/File.php b/apps/dav/lib/Connector/Sabre/File.php index 597e6ebef90..6a467e9eff2 100644 --- a/apps/dav/lib/Connector/Sabre/File.php +++ b/apps/dav/lib/Connector/Sabre/File.php @@ -144,6 +144,8 @@ class File extends Node implements IFile { } else { // upload file directly as the final path $partFilePath = $this->path; + + $this->emitPreHooks($exists); } // the part file and target file might be on a different storage in case of a single file storage (e.g. single file share) @@ -188,11 +190,7 @@ class File extends Node implements IFile { try { $view = \OC\Files\Filesystem::getView(); - if ($view) { - $run = $this->emitPreHooks($exists); - } else { - $run = true; - } + $run = ($view && $needsPartFile) ? $this->emitPreHooks($exists) : true; try { $this->changeLock(ILockingProvider::LOCK_EXCLUSIVE); |