Skip to content

Commit 93047d3

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

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
@@ -111,11 +111,11 @@ public function createFile($name, $data = null) {
111111

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

116116
$result = $node->put($data);
117117

118-
$this->fileView->unlockFile($path . '.upload.part', ILockingProvider::LOCK_EXCLUSIVE);
118+
$this->fileView->unlockFile($this->path . '/' . $name . '.upload.part', ILockingProvider::LOCK_EXCLUSIVE);
119119
$node->releaseLock(ILockingProvider::LOCK_SHARED);
120120
return $result;
121121
} catch (StorageNotAvailableException $e) {

0 commit comments

Comments
 (0)