aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2016-02-11 14:02:08 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2016-02-11 14:02:08 +0100
commit26939a28730eb7b3417cd02bb6c35ef748cced11 (patch)
tree5060630d4705cbf20a0067ad92182d458a7232e2 /apps
parent73e37377771ecd24ca44bc3176e491977df0da10 (diff)
parentbef70e9448931cf8229f26f2aed0579340089e9d (diff)
downloadnextcloud-server-26939a28730eb7b3417cd02bb6c35ef748cced11.tar.gz
nextcloud-server-26939a28730eb7b3417cd02bb6c35ef748cced11.zip
Merge pull request #22290 from owncloud/dav-upload-scan-in-lock
scan the file in the write lock when uploading over dav
Diffstat (limited to 'apps')
-rw-r--r--apps/dav/lib/connector/sabre/file.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/apps/dav/lib/connector/sabre/file.php b/apps/dav/lib/connector/sabre/file.php
index be313a91e8c..38a1ee5f4e2 100644
--- a/apps/dav/lib/connector/sabre/file.php
+++ b/apps/dav/lib/connector/sabre/file.php
@@ -194,15 +194,15 @@ class File extends Node implements IFile {
}
}
+ // since we skipped the view we need to scan and emit the hooks ourselves
+ $storage->getUpdater()->update($internalPath);
+
try {
$this->changeLock(ILockingProvider::LOCK_SHARED);
} catch (LockedException $e) {
throw new FileLocked($e->getMessage(), $e->getCode(), $e);
}
- // since we skipped the view we need to scan and emit the hooks ourselves
- $storage->getUpdater()->update($internalPath);
-
if ($view) {
$this->emitPostHooks($exists);
}
@@ -450,11 +450,11 @@ class File extends Node implements IFile {
}
}
- $this->fileView->changeLock($targetPath, ILockingProvider::LOCK_SHARED);
-
// since we skipped the view we need to scan and emit the hooks ourselves
$targetStorage->getUpdater()->update($targetInternalPath);
+ $this->fileView->changeLock($targetPath, ILockingProvider::LOCK_SHARED);
+
$this->emitPostHooks($exists, $targetPath);
$info = $this->fileView->getFileInfo($targetPath);