Skip to content

Commit 1eb1126

Browse files
icewind1991kesselb
authored andcommitted
fix: use relative paths for upload locks
Signed-off-by: Robin Appelman <robin@icewind.nl>
1 parent af91356 commit 1eb1126

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

apps/dav/lib/Connector/Sabre/Directory.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,11 +143,11 @@ public function createFile($name, $data = null) {
143143

144144
// only allow 1 process to upload a file at once but still allow reading the file while writing the part file
145145
$node->acquireLock(ILockingProvider::LOCK_SHARED);
146-
$this->fileView->lockFile($path . '.upload.part', ILockingProvider::LOCK_EXCLUSIVE);
146+
$this->fileView->lockFile($this->path . '/' . $name . '.upload.part', ILockingProvider::LOCK_EXCLUSIVE);
147147

148148
$result = $node->put($data);
149149

150-
$this->fileView->unlockFile($path . '.upload.part', ILockingProvider::LOCK_EXCLUSIVE);
150+
$this->fileView->unlockFile($this->path . '/' . $name . '.upload.part', ILockingProvider::LOCK_EXCLUSIVE);
151151
$node->releaseLock(ILockingProvider::LOCK_SHARED);
152152
return $result;
153153
} catch (\OCP\Files\StorageNotAvailableException $e) {

0 commit comments

Comments
 (0)