Skip to content

Commit 06f0765

Browse files
CarlSchwanDerDreschner
authored andcommitted
fix: Fix permission issue when uploading a chunked file
Follow up from #59511 Signed-off-by: Carl Schwan <carlschwan@kde.org>
1 parent d1fb84f commit 06f0765

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

apps/dav/appinfo/v2/publicremote.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* SPDX-License-Identifier: AGPL-3.0-only
77
*/
88
use OC\Files\Filesystem;
9-
use OC\Files\Storage\Wrapper\PermissionsMask;
9+
use OC\Files\Storage\Wrapper\DirPermissionsMask;
1010
use OC\Files\View;
1111
use OCA\DAV\Connector\Sabre\PublicAuth;
1212
use OCA\DAV\Connector\Sabre\ServerFactory;
@@ -116,7 +116,11 @@
116116
$mask |= Constants::PERMISSION_READ | Constants::PERMISSION_DELETE;
117117
}
118118

119-
return new PermissionsMask(['storage' => $storage, 'mask' => $mask]);
119+
return new DirPermissionsMask([
120+
'storage' => $storage,
121+
'mask' => $mask,
122+
'path' => 'files',
123+
]);
120124
});
121125

122126
/** @psalm-suppress MissingClosureParamType */

lib/private/Files/Storage/Wrapper/DirPermissionsMask.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ public function getPermissions($path): int {
9494

9595
#[\Override]
9696
public function rename($source, $target): bool {
97-
if (!$this->isUpdatable($source)) {
97+
if (!$this->isDeletable($source)) {
9898
return false;
9999
}
100100

0 commit comments

Comments
 (0)