mirror of
https://github.com/nextcloud/server.git
synced 2026-06-08 16:26:59 -04:00
fix: use relative paths for upload locks
Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
parent
9e1ae74a1c
commit
4978cd3c21
1 changed files with 2 additions and 2 deletions
|
|
@ -111,11 +111,11 @@ class Directory extends Node implements \Sabre\DAV\ICollection, \Sabre\DAV\IQuot
|
|||
|
||||
// only allow 1 process to upload a file at once but still allow reading the file while writing the part file
|
||||
$node->acquireLock(ILockingProvider::LOCK_SHARED);
|
||||
$this->fileView->lockFile($path . '.upload.part', ILockingProvider::LOCK_EXCLUSIVE);
|
||||
$this->fileView->lockFile($this->path . '/' . $name . '.upload.part', ILockingProvider::LOCK_EXCLUSIVE);
|
||||
|
||||
$result = $node->put($data);
|
||||
|
||||
$this->fileView->unlockFile($path . '.upload.part', ILockingProvider::LOCK_EXCLUSIVE);
|
||||
$this->fileView->unlockFile($this->path . '/' . $name . '.upload.part', ILockingProvider::LOCK_EXCLUSIVE);
|
||||
$node->releaseLock(ILockingProvider::LOCK_SHARED);
|
||||
return $result;
|
||||
} catch (StorageNotAvailableException $e) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue