Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2018-03-08 15:02:35 +0300
committerRobin Appelman <robin@icewind.nl>2018-03-08 15:09:09 +0300
commit9342f97a28f20471643728b3c735772c0dd108f1 (patch)
treee44f4afd9861cba4905fac86e43ec8ef844430cb /apps
parenta95ccf4248251e6593350aa640395f28d24bbe62 (diff)
emit pre-hooks earlier when not using part files
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'apps')
-rw-r--r--apps/dav/lib/Connector/Sabre/File.php8
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);