From 8f7f696110aae155e5e29eacc13b33da0c5047d6 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Wed, 25 Oct 2023 16:43:57 +0200 Subject: remove some unneeded normalizePath calls Signed-off-by: Robin Appelman --- apps/files_sharing/lib/SharedStorage.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'apps/files_sharing/lib') diff --git a/apps/files_sharing/lib/SharedStorage.php b/apps/files_sharing/lib/SharedStorage.php index c56bcaebb12..6d9b9a62e4a 100644 --- a/apps/files_sharing/lib/SharedStorage.php +++ b/apps/files_sharing/lib/SharedStorage.php @@ -112,7 +112,7 @@ class SharedStorage extends \OC\Files\Storage\Wrapper\Jail implements ISharedSto parent::__construct([ 'storage' => null, - 'root' => null, + 'root' => '', ]); } @@ -292,12 +292,16 @@ class SharedStorage extends \OC\Files\Storage\Wrapper\Jail implements ISharedSto case 'xb': case 'a': case 'ab': - $creatable = $this->isCreatable(dirname($path)); + $parent = dirname($path); + if ($parent === '.') { + $parent = ''; + } + $creatable = $this->isCreatable($parent); $updatable = $this->isUpdatable($path); // if neither permissions given, no need to continue if (!$creatable && !$updatable) { if (pathinfo($path, PATHINFO_EXTENSION) === 'part') { - $updatable = $this->isUpdatable(dirname($path)); + $updatable = $this->isUpdatable($parent); } if (!$updatable) { -- cgit v1.2.3