Merge pull request #52499 from nextcloud/backport/49895/stable30

[stable30] fix: Fix copying to the root of another mountpoint
This commit is contained in:
Côme Chilliet 2025-04-28 14:16:58 +02:00 committed by GitHub
commit 0272caf2d6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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