Merge pull request #34607 from nextcloud/encryption-size-not-found

fix encryption wrapper filesize for non existing files
This commit is contained in:
Vincent Petry 2023-04-06 18:04:44 +02:00 committed by GitHub
commit 9f05eff3ef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View 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