Merge pull request #22290 from owncloud/dav-upload-scan-in-lock
scan the file in the write lock when uploading over dav
This commit is contained in:
commit
26939a2873
|
@ -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 {
|
try {
|
||||||
$this->changeLock(ILockingProvider::LOCK_SHARED);
|
$this->changeLock(ILockingProvider::LOCK_SHARED);
|
||||||
} catch (LockedException $e) {
|
} catch (LockedException $e) {
|
||||||
throw new FileLocked($e->getMessage(), $e->getCode(), $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) {
|
if ($view) {
|
||||||
$this->emitPostHooks($exists);
|
$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
|
// since we skipped the view we need to scan and emit the hooks ourselves
|
||||||
$targetStorage->getUpdater()->update($targetInternalPath);
|
$targetStorage->getUpdater()->update($targetInternalPath);
|
||||||
|
|
||||||
|
$this->fileView->changeLock($targetPath, ILockingProvider::LOCK_SHARED);
|
||||||
|
|
||||||
$this->emitPostHooks($exists, $targetPath);
|
$this->emitPostHooks($exists, $targetPath);
|
||||||
|
|
||||||
$info = $this->fileView->getFileInfo($targetPath);
|
$info = $this->fileView->getFileInfo($targetPath);
|
||||||
|
|
Loading…
Reference in New Issue