Merge pull request #8726 from nextcloud/objectstore-no-part-files-12

[12]  disable part files for object stores
This commit is contained in:
Morris Jobke 2018-03-09 14:06:52 +01:00 committed by GitHub
commit aee8381f21
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 5 deletions

View File

@ -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);

View File

@ -424,4 +424,8 @@ class ObjectStoreStorage extends \OC\Files\Storage\Common {
public function hasUpdated($path, $time) {
return false;
}
public function needsPartFile() {
return false;
}
}