Browse Source

emit pre-hooks earlier when not using part files

Signed-off-by: Robin Appelman <robin@icewind.nl>
tags/v14.0.0beta1
Robin Appelman 6 years ago
parent
commit
f5ef9e02b2
No account linked to committer's email address
1 changed files with 3 additions and 5 deletions
  1. 3
    5
      apps/dav/lib/Connector/Sabre/File.php

+ 3
- 5
apps/dav/lib/Connector/Sabre/File.php View File

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

Loading…
Cancel
Save