From 826b89bef8bb36dd983edd0de1316344ff24c0ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= Date: Tue, 17 Dec 2024 14:09:11 +0100 Subject: [PATCH] fix: Fix copying to the root of another mountpoint MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Côme Chilliet --- lib/private/Files/Cache/Updater.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/private/Files/Cache/Updater.php b/lib/private/Files/Cache/Updater.php index 42812dbc8822e..03681036aa211 100644 --- a/lib/private/Files/Cache/Updater.php +++ b/lib/private/Files/Cache/Updater.php @@ -186,6 +186,9 @@ public function renameFromStorage(IStorage $sourceStorage, $source, $target) { 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);