You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(encryption): Address review feedback and fix zero-byte size consistency
Apply come-nc's reviewer suggestions on Scanner.php:
- Simplify cached unencrypted_size skip condition to explicit == 0 check
- Remove redundant !isset guard on new-file path
Fix remaining > 0 / !== 0 guards that treated zero as "no unencrypted_size":
- FileInfo constructor: use encrypted flag for rawSize (getSize(false) path)
- FileInfo::addSubEntry: use encrypted flag for sub-mount accumulation
- Cache::calculateFolderSizeInner: use encrypted column instead of > 0
Add tests covering zero-byte encrypted file scenarios:
- FileInfoTest: getSize(true/false) for zero-byte encrypted files
- CacheTest: getUnencryptedSize and calculateFolderSize with encrypted=1,size=0
- EncryptionTest: verifyUnencryptedSize data provider cases for header-only files
Assisted-by: ClaudeCode:claude-opus-4-6
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Signed-off-by: Stephen Cuppett <[email protected]>
0 commit comments