From 08c7001a04a8d414283f32e9ea35787be91bdbe8 Mon Sep 17 00:00:00 2001 From: Côme Chilliet Date: Tue, 17 Dec 2024 14:09:11 +0100 Subject: 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 42812dbc882..03681036aa2 100644 --- a/lib/private/Files/Cache/Updater.php +++ b/lib/private/Files/Cache/Updater.php @@ -186,6 +186,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); -- cgit v1.2.3