Skip to content

Commit 551209f

Browse files
cuppettclaude
andcommitted
fix(encryption): Use encrypted flag in FileInfo constructor for rawSize
Aligns with the stable34 backport (#62780): the constructor still compared unencrypted_size against 0 instead of checking the encrypted flag, so getSize(false) fell back to the on-disk size for zero-byte encrypted files. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
1 parent ecfcd15 commit 551209f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/private/Files/FileInfo.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public function __construct($path, $storage, $internalPath, $data, $mount, $owne
7373
$this->data = $data;
7474
$this->mount = $mount;
7575
$this->owner = $owner;
76-
if (isset($this->data['unencrypted_size']) && $this->data['unencrypted_size'] !== 0) {
76+
if (($this->data['encrypted'] ?? false) && isset($this->data['unencrypted_size'])) {
7777
$this->rawSize = $this->data['unencrypted_size'];
7878
} else {
7979
$this->rawSize = $this->data['size'] ?? 0;

0 commit comments

Comments
 (0)