mirror of
https://github.com/nextcloud/server.git
synced 2026-05-27 12:13:04 -04:00
Merge pull request #54267 from nextcloud/backport/54266/stable30
[stable30] fix(lib): get fileinfo before locking
This commit is contained in:
commit
6c4460f3e4
1 changed files with 5 additions and 2 deletions
|
|
@ -109,7 +109,6 @@ class OC_Files {
|
|||
}
|
||||
}
|
||||
|
||||
self::lockFiles($view, $dir, $files);
|
||||
$numberOfFiles = 0;
|
||||
$fileSize = 0;
|
||||
|
||||
|
|
@ -132,7 +131,11 @@ class OC_Files {
|
|||
}
|
||||
}
|
||||
|
||||
//Dispatch an event to see if any apps have problem with download
|
||||
// Lock the files AFTER we retrieved the files infos
|
||||
// this allows us to ensure they're still available
|
||||
self::lockFiles($view, $dir, $files);
|
||||
|
||||
// Dispatch an event to see if any apps have problem with download
|
||||
$event = new BeforeZipCreatedEvent($dir, is_array($files) ? $files : [$files]);
|
||||
$dispatcher = \OCP\Server::get(IEventDispatcher::class);
|
||||
$dispatcher->dispatchTyped($event);
|
||||
|
|
|
|||
Loading…
Reference in a new issue