Skip to content

Commit

Permalink
Merge pull request #2170 from nextcloud/backport/2166/stable28
Browse files Browse the repository at this point in the history
[stable28] fix: Skip empty files in metadata providers
  • Loading branch information
artonge authored Dec 6, 2023
2 parents 3deebdd + 9b97c47 commit 6775d09
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 6775d09

Please sign in to comment.