diff options
author | Robin Appelman <robin@icewind.nl> | 2023-10-25 16:43:57 +0200 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2023-11-02 14:21:08 +0100 |
commit | 8f7f696110aae155e5e29eacc13b33da0c5047d6 (patch) | |
tree | bac57add83bc2c68822f30f7037d24becf3032fe /apps/files_sharing/lib | |
parent | b2c0cd9e266d82382d101da195e7745ebe0accfd (diff) | |
download | nextcloud-server-normlize-less.tar.gz nextcloud-server-normlize-less.zip |
remove some unneeded normalizePath callsnormlize-less
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'apps/files_sharing/lib')
-rw-r--r-- | apps/files_sharing/lib/SharedStorage.php | 10 |
1 files changed, 7 insertions, 3 deletions
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) { |