mirror of
https://github.com/nextcloud/server.git
synced 2026-03-04 18:28:08 +01:00
fix: use relative paths for upload locks
Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
committed by
Daniel Kesselberg
parent
83986127f5
commit
67b013bc38
@@ -143,11 +143,11 @@ class Directory extends \OCA\DAV\Connector\Sabre\Node implements \Sabre\DAV\ICol
|
||||
|
||||
// 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 (\OCP\Files\StorageNotAvailableException $e) {
|
||||
|
||||
Reference in New Issue
Block a user