summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing
diff options
context:
space:
mode:
authorCarl Schwan <carl@carlschwan.eu>2022-10-18 12:49:34 +0200
committerCarl Schwan <carl@carlschwan.eu>2022-10-18 17:21:47 +0200
commita5ea677370df4479cc309f4c359599590c24f278 (patch)
treecd861667f467b31ff58ecf39613507432eb83d35 /apps/files_sharing
parent732badf552c91733192e87d6ceb2848b4b75d439 (diff)
downloadnextcloud-server-a5ea677370df4479cc309f4c359599590c24f278.tar.gz
nextcloud-server-a5ea677370df4479cc309f4c359599590c24f278.zip
Rename file1 and file2 to source and target in Storage abstraction
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
Diffstat (limited to 'apps/files_sharing')
-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));
}
/**