aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2024-12-17 14:09:11 +0100
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>2025-04-28 10:25:44 +0000
commita1065197b54d61d858198b7373c96b8c9ccc2685 (patch)
tree60b4cd919289193989228d6724717e6e908eb595
parent6de5be9af8d4578d7bcbff712900d3e1269bf993 (diff)
downloadnextcloud-server-backport/49895/stable29.tar.gz
nextcloud-server-backport/49895/stable29.zip
fix: Fix copying to the root of another mountpointbackport/49895/stable29
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
-rw-r--r--lib/private/Files/Cache/Updater.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/private/Files/Cache/Updater.php b/lib/private/Files/Cache/Updater.php
index 069861198bb..799671b3ecb 100644
--- a/lib/private/Files/Cache/Updater.php
+++ b/lib/private/Files/Cache/Updater.php
@@ -206,6 +206,9 @@ class Updater implements IUpdater {
public function copyFromStorage(IStorage $sourceStorage, string $source, string $target): void {
$this->copyOrRenameFromStorage($sourceStorage, $source, $target, function (ICache $sourceCache, ICacheEntry $sourceInfo) use ($target) {
$parent = dirname($target);
+ if ($parent === '.') {
+ $parent = '';
+ }
$parentInCache = $this->cache->inCache($parent);
if (!$parentInCache) {
$parentData = $this->scanner->scan($parent, Scanner::SCAN_SHALLOW, -1, false);