Skip to content

Commit

Permalink
fix: Skip empty files in metadata providers
Browse files Browse the repository at this point in the history
Signed-off-by: Julius Härtl <jus@bitgrid.net>
  • Loading branch information
juliusknorr authored and backportbot-nextcloud[bot] committed Dec 4, 2023
1 parent 4da520b commit 54a68a4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/Listener/ExifMetadataProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public function handle(Event $event): void {

$node = $event->getNode();

if (!$node instanceof File) {
if (!$node instanceof File || $node->getSize() === 0) {
return;
}

Expand Down
2 changes: 1 addition & 1 deletion lib/Listener/SizeMetadataProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public function handle(Event $event): void {

$node = $event->getNode();

if (!$node instanceof File) {
if (!$node instanceof File || $node->getSize() === 0) {
return;
}

Expand Down

0 comments on commit 54a68a4

Please sign in to comment.