diff options
author | Roeland Jago Douma <rullzer@users.noreply.github.com> | 2018-03-08 20:52:16 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-08 20:52:16 +0100 |
commit | d05469959e9d2f51110ec2692b042e029f28d66d (patch) | |
tree | fece89131855a0bb902a79512081b9549da3cfa2 | |
parent | cccf6f4d5f18ad01ff5fcd296d7b8411c1e11139 (diff) | |
parent | f5ef9e02b2a74c6bd8da9863062a7ecaddf60b8b (diff) | |
download | nextcloud-server-d05469959e9d2f51110ec2692b042e029f28d66d.tar.gz nextcloud-server-d05469959e9d2f51110ec2692b042e029f28d66d.zip |
Merge pull request #8715 from nextcloud/objectstore-no-part-files
disable part files for object stores
-rw-r--r-- | apps/dav/lib/Connector/Sabre/File.php | 8 | ||||
-rw-r--r-- | lib/private/Files/ObjectStore/ObjectStoreStorage.php | 4 |
2 files changed, 7 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); diff --git a/lib/private/Files/ObjectStore/ObjectStoreStorage.php b/lib/private/Files/ObjectStore/ObjectStoreStorage.php index 84d714ce7de..3ce919a4cbe 100644 --- a/lib/private/Files/ObjectStore/ObjectStoreStorage.php +++ b/lib/private/Files/ObjectStore/ObjectStoreStorage.php @@ -429,4 +429,8 @@ class ObjectStoreStorage extends \OC\Files\Storage\Common { public function hasUpdated($path, $time) { return false; } + + public function needsPartFile() { + return false; + } } |