]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fix metadata extraction 33049/head
authorCarl Schwan <carl@carlschwan.eu>
Wed, 22 Jun 2022 15:27:09 +0000 (17:27 +0200)
committerbackportbot-nextcloud[bot] <backportbot-nextcloud[bot]@users.noreply.github.com>
Tue, 28 Jun 2022 13:37:59 +0000 (13:37 +0000)
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 <carl@carlschwan.eu>
lib/private/Files/FileInfo.php

index 5912eefcf9c8d7955366685108d812ab050a3108..7a984429d1f3198eed7ded195dffaa14967367bd 100644 (file)
@@ -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;