fix: Fix copying to the root of another mountpoint

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
This commit is contained in:
Côme Chilliet 2024-12-17 14:09:11 +01:00 committed by Jonas
parent fe90aa3ffe
commit 08c7001a04

View file

@ -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);