diff options
author | Côme Chilliet <come.chilliet@nextcloud.com> | 2024-12-17 14:09:11 +0100 |
---|---|---|
committer | Jonas <jonas@freesources.org> | 2024-12-17 18:24:35 +0100 |
commit | 08c7001a04a8d414283f32e9ea35787be91bdbe8 (patch) | |
tree | 623da1a01578665ef039025e84640f974f3842ce | |
parent | fe90aa3ffe0a8127a92cf0226333c44ed5b793dc (diff) | |
download | nextcloud-server-08c7001a04a8d414283f32e9ea35787be91bdbe8.tar.gz nextcloud-server-08c7001a04a8d414283f32e9ea35787be91bdbe8.zip |
fix: Fix copying to the root of another mountpointfix/fix-copy-to-mountpoint-root
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
-rw-r--r-- | lib/private/Files/Cache/Updater.php | 3 |
1 files changed, 3 insertions, 0 deletions
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); |