summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/lib
diff options
context:
space:
mode:
authorCarl Schwan <carl@carlschwan.eu>2022-10-20 16:53:43 +0200
committerGitHub <noreply@github.com>2022-10-20 16:53:43 +0200
commit0f0f132959254432fd40e709dd558a45585e0803 (patch)
treeb79baee2e5c32158a22657640af0d5bf5c77f502 /apps/files_sharing/lib
parent00c4c3d72332e54b588ccd8009c05cfe724b194a (diff)
parenta5ea677370df4479cc309f4c359599590c24f278 (diff)
downloadnextcloud-server-0f0f132959254432fd40e709dd558a45585e0803.tar.gz
nextcloud-server-0f0f132959254432fd40e709dd558a45585e0803.zip
Merge pull request #34624 from nextcloud/fix/files_external_psalm
Multiple fix for files external
Diffstat (limited to 'apps/files_sharing/lib')
-rw-r--r--apps/files_sharing/lib/SharedStorage.php14
1 files changed, 7 insertions, 7 deletions
diff --git a/apps/files_sharing/lib/SharedStorage.php b/apps/files_sharing/lib/SharedStorage.php
index f4ad29cb74c..b5c0da9c442 100644
--- a/apps/files_sharing/lib/SharedStorage.php
+++ b/apps/files_sharing/lib/SharedStorage.php
@@ -334,15 +334,15 @@ class SharedStorage extends \OC\Files\Storage\Wrapper\Jail implements ISharedSto
/**
* see https://www.php.net/manual/en/function.rename.php
*
- * @param string $path1
- * @param string $path2
+ * @param string $source
+ * @param string $target
* @return bool
*/
- public function rename($path1, $path2): bool {
+ public function rename($source, $target): bool {
$this->init();
- $isPartFile = pathinfo($path1, PATHINFO_EXTENSION) === 'part';
- $targetExists = $this->file_exists($path2);
- $sameFolder = dirname($path1) === dirname($path2);
+ $isPartFile = pathinfo($source, PATHINFO_EXTENSION) === 'part';
+ $targetExists = $this->file_exists($target);
+ $sameFolder = dirname($source) === dirname($target);
if ($targetExists || ($sameFolder && !$isPartFile)) {
if (!$this->isUpdatable('')) {
@@ -354,7 +354,7 @@ class SharedStorage extends \OC\Files\Storage\Wrapper\Jail implements ISharedSto
}
}
- return $this->nonMaskedStorage->rename($this->getUnjailedPath($path1), $this->getUnjailedPath($path2));
+ return $this->nonMaskedStorage->rename($this->getUnjailedPath($source), $this->getUnjailedPath($target));
}
/**