]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix encryption wrapper filesize for non existing files 34607/head
authorRobin Appelman <robin@icewind.nl>
Fri, 14 Oct 2022 12:50:35 +0000 (14:50 +0200)
committerRobin Appelman <robin@icewind.nl>
Tue, 4 Apr 2023 14:21:17 +0000 (16:21 +0200)
Signed-off-by: Robin Appelman <robin@icewind.nl>
lib/private/Files/Storage/Wrapper/Encryption.php

index 4d860e623e0c50f69ee0969f9542b092776cd1d5..0eba59d2156c47f43193791f7b5f97498b2906de 100644 (file)
@@ -137,8 +137,10 @@ class Encryption extends Wrapper {
        public function filesize($path): false|int|float {
                $fullPath = $this->getFullPath($path);
 
-               /** @var CacheEntry $info */
                $info = $this->getCache()->get($path);
+               if ($info === false) {
+                       return false;
+               }
                if (isset($this->unencryptedSize[$fullPath])) {
                        $size = $this->unencryptedSize[$fullPath];
                        // update file cache