aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Files/Storage
diff options
context:
space:
mode:
authorVincent Petry <PVince81@yahoo.fr>2023-04-06 18:04:44 +0200
committerGitHub <noreply@github.com>2023-04-06 18:04:44 +0200
commit9f05eff3eff7e5fc6b4e36ef5794b36f2432ead8 (patch)
treeec5be74e466921eddd696501aafcdfe72a58bbcc /lib/private/Files/Storage
parent30110134f126c9c2f17ec943b10c3afa0760c30b (diff)
parent15a6920b07d0e4d7af0c432c661c293df377b5c2 (diff)
downloadnextcloud-server-9f05eff3eff7e5fc6b4e36ef5794b36f2432ead8.tar.gz
nextcloud-server-9f05eff3eff7e5fc6b4e36ef5794b36f2432ead8.zip
Merge pull request #34607 from nextcloud/encryption-size-not-found
fix encryption wrapper filesize for non existing files
Diffstat (limited to 'lib/private/Files/Storage')
-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