Skip to content

Commit

Permalink
Merge pull request #8715 from nextcloud/objectstore-no-part-files
Browse files Browse the repository at this point in the history
disable part files for object stores
  • Loading branch information
rullzer authored Mar 8, 2018
2 parents cccf6f4 + f5ef9e0 commit d054699
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
8 changes: 3 additions & 5 deletions apps/dav/lib/Connector/Sabre/File.php
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,8 @@ public function put($data) {
} 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)
Expand Down Expand Up @@ -188,11 +190,7 @@ public function put($data) {

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);
Expand Down
4 changes: 4 additions & 0 deletions lib/private/Files/ObjectStore/ObjectStoreStorage.php
Original file line number Diff line number Diff line change
Expand Up @@ -429,4 +429,8 @@ public function writeBack($tmpFile, $path) {
public function hasUpdated($path, $time) {
return false;
}

public function needsPartFile() {
return false;
}
}

0 comments on commit d054699

Please sign in to comment.