Skip to content

Commit

Permalink
emit pre-hooks earlier when not using part files
Browse files Browse the repository at this point in the history
Signed-off-by: Robin Appelman <robin@icewind.nl>
  • Loading branch information
icewind1991 committed Mar 8, 2018
1 parent a95ccf4 commit 9342f97
Showing 1 changed file with 3 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

0 comments on commit 9342f97

Please sign in to comment.