aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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);