summaryrefslogtreecommitdiffstats
path: root/apps/dav
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2018-03-08 13:02:35 +0100
committerRobin Appelman <robin@icewind.nl>2018-03-08 13:09:43 +0100
commit550f9cafc8ac9a8da4c3eeecdb6739dd0ed593cf (patch)
tree69fbc36551031bab32372f61fb0a5187526fa6a3 /apps/dav
parent50162e619cca05684585c22fc7afd50c79a057e0 (diff)
downloadnextcloud-server-550f9cafc8ac9a8da4c3eeecdb6739dd0ed593cf.tar.gz
nextcloud-server-550f9cafc8ac9a8da4c3eeecdb6739dd0ed593cf.zip
emit pre-hooks earlier when not using part files
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'apps/dav')
-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 ab04890d6c7..f5a482c8567 100644
--- a/apps/dav/lib/Connector/Sabre/File.php
+++ b/apps/dav/lib/Connector/Sabre/File.php
@@ -117,6 +117,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)
@@ -161,11 +163,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);