mirror of
https://github.com/nextcloud/server.git
synced 2026-10-05 18:38:03 +02:00
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>