aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorskjnldsv <skjnldsv@protonmail.com>2025-08-05 19:36:18 +0200
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>2025-08-05 17:39:47 +0000
commit55e9491011f8751fc09802180202e8ab1053374f (patch)
tree661076d11b55af7e686caa66b9c21bcc2ba3b0ff
parent13a0fc8c972ae2aed22889cd63a7c6b1c8daa491 (diff)
downloadnextcloud-server-backport/54266/stable30.tar.gz
nextcloud-server-backport/54266/stable30.zip
fix(lib): get fileinfo before lockingbackport/54266/stable30
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
-rw-r--r--lib/private/legacy/OC_Files.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/private/legacy/OC_Files.php b/lib/private/legacy/OC_Files.php
index f719e05a24c..23ea252d98f 100644
--- a/lib/private/legacy/OC_Files.php
+++ b/lib/private/legacy/OC_Files.php
@@ -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);