mirror of
https://github.com/nextcloud/server.git
synced 2026-06-15 11:41:20 -04:00
Merge pull request #52190 from nextcloud/backport/49695/stable29
This commit is contained in:
commit
f84f0809fe
1 changed files with 9 additions and 1 deletions
|
|
@ -205,7 +205,15 @@ 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) {
|
||||
$this->cache->copyFromCache($sourceCache, $sourceInfo, $target);
|
||||
$parent = dirname($target);
|
||||
$parentInCache = $this->cache->inCache($parent);
|
||||
if (!$parentInCache) {
|
||||
$parentData = $this->scanner->scan($parent, Scanner::SCAN_SHALLOW, -1, false);
|
||||
$parentInCache = $parentData !== null;
|
||||
}
|
||||
if ($parentInCache) {
|
||||
$this->cache->copyFromCache($sourceCache, $sourceInfo, $target);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue