From: Carl Schwan Date: Wed, 22 Jun 2022 15:27:09 +0000 (+0200) Subject: Fix metadata extraction X-Git-Tag: v24.0.3rc1~33^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=de4f7b5c9c454fe8fe405aea70efbdd5ec486e64;p=nextcloud-server.git Fix metadata extraction The metadata extraction only happens when the size is not equal to 0, but due to a regression in FileInfo the size is always zero. This fix the regression. Signed-off-by: Carl Schwan --- diff --git a/lib/private/Files/FileInfo.php b/lib/private/Files/FileInfo.php index 5912eefcf9c..7a984429d1f 100644 --- a/lib/private/Files/FileInfo.php +++ b/lib/private/Files/FileInfo.php @@ -101,7 +101,7 @@ class FileInfo implements \OCP\Files\FileInfo, \ArrayAccess { $this->data = $data; $this->mount = $mount; $this->owner = $owner; - if (isset($this->data['unencrypted_size'])) { + if (isset($this->data['unencrypted_size']) && $this->data['unencrypted_size'] !== 0) { $this->rawSize = $this->data['unencrypted_size']; } else { $this->rawSize = $this->data['size'] ?? 0;