Skip to content

[stable33] fix(files): carry the unencrypted size over when copying a cache entry - #64606

Draft
backportbot[bot] wants to merge 1 commit into
stable33from
backport/64380/stable33
Draft

backportbot[bot] wants to merge 1 commit into
stable33from
backport/64380/stable33

Conversation

@backportbot

@backportbot backportbot Bot commented Sep 20, 2026

Copy link
Copy Markdown

Backport of #64380

Warning, This backport's changes differ from the original and might be incomplete ⚠️

Todo

  • Review and resolve any conflicts
  • Review and verify the backported changes
  • Amend HEAD commit to remove the line stating to skip CI

Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.

fix(files): carry the unencrypted size over when copying a cache entry

The size of an encrypted file lives in `unencrypted_size`, and both

CacheEntry::getUnencryptedSize() and FileInfo::getSize() prefer it over

`size`. Cache::copyFromCache() copied the `encrypted` mark without it, so

the copy of an encrypted file was marked encrypted with an unencrypted size

of 0 and reported as empty - in the web UI, to clients and for quota - until

something rescanned it.

Copy the unencrypted size alongside the encrypted version, and reset it when

the mark is dropped for a target that is not encrypted, where the size is

read from `size`.

Assisted-by: ClaudeCode:claude-opus-5

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>

[skip ci]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant