Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions apps/dav/appinfo/v2/publicremote.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* SPDX-License-Identifier: AGPL-3.0-only
*/
use OC\Files\Filesystem;
use OC\Files\Storage\Wrapper\PermissionsMask;
use OC\Files\Storage\Wrapper\DirPermissionsMask;
use OC\Files\View;
use OCA\DAV\Connector\Sabre\PublicAuth;
use OCA\DAV\Connector\Sabre\ServerFactory;
Expand Down Expand Up @@ -116,7 +116,11 @@
$mask |= Constants::PERMISSION_READ | Constants::PERMISSION_DELETE;
}

return new PermissionsMask(['storage' => $storage, 'mask' => $mask]);
return new DirPermissionsMask([
'storage' => $storage,
'mask' => $mask,
'path' => 'files',
]);
});

/** @psalm-suppress MissingClosureParamType */
Expand Down
2 changes: 1 addition & 1 deletion lib/private/Files/Storage/Wrapper/DirPermissionsMask.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public function getPermissions($path): int {
}

public function rename($source, $target): bool {
if (!$this->isUpdatable($source)) {
if (!($this->isDeletable($source) || $this->isUpdatable($source))) {
return false;
}

Expand Down
Loading