summaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2022-10-14 14:50:35 +0200
committerRobin Appelman <robin@icewind.nl>2023-04-04 16:21:17 +0200
commit15a6920b07d0e4d7af0c432c661c293df377b5c2 (patch)
treef883d8b49c5f8221c6553d71c0249b0cf7235342 /lib/private
parent59d0e7711dc84d46b30fd7a66ec13d8207b87150 (diff)
downloadnextcloud-server-15a6920b07d0e4d7af0c432c661c293df377b5c2.tar.gz
nextcloud-server-15a6920b07d0e4d7af0c432c661c293df377b5c2.zip
fix encryption wrapper filesize for non existing files
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/Files/Storage/Wrapper/Encryption.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/private/Files/Storage/Wrapper/Encryption.php b/lib/private/Files/Storage/Wrapper/Encryption.php
index 4d860e623e0..0eba59d2156 100644
--- a/lib/private/Files/Storage/Wrapper/Encryption.php
+++ b/lib/private/Files/Storage/Wrapper/Encryption.php
@@ -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