From fb5ff8fbedfe94223047f391b604110b5d4962e4 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Fri, 14 Oct 2022 14:50:35 +0200 Subject: [PATCH] fix encryption wrapper filesize for non existing files Signed-off-by: Robin Appelman --- lib/private/Files/Storage/Wrapper/Encryption.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/private/Files/Storage/Wrapper/Encryption.php b/lib/private/Files/Storage/Wrapper/Encryption.php index 21db6b7bf9de4..7e50c5d1e6524 100644 --- a/lib/private/Files/Storage/Wrapper/Encryption.php +++ b/lib/private/Files/Storage/Wrapper/Encryption.php @@ -135,8 +135,10 @@ public function __construct( public function filesize($path) { $fullPath = $this->getFullPath($path); - /** @var CacheEntry $info */ $info = $this->getCache()->get($path); + if ($info === false) { + return 0; + } if (isset($this->unencryptedSize[$fullPath])) { $size = $this->unencryptedSize[$fullPath]; // update file cache