Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scan the file in the write lock when uploading over dav #22290

Merged
merged 2 commits into from Feb 11, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 5 additions & 5 deletions apps/dav/lib/connector/sabre/file.php
Expand Up @@ -194,15 +194,15 @@ public function put($data) {
}
}

// 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);
}
Expand Down Expand Up @@ -450,11 +450,11 @@ private function createFileChunked($data) {
}
}

$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);
Expand Down