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
When libzip tries to open an incomplete (truncated) ZIP archive, it fails with the error code ZIP_ER_NOZIP "Not a zip archive".
Solution
Would it be possible to distinguish the two situations by returning different error codes?
The file doesn't look like a ZIP archive at all.
In this case ZIP_ER_NOZIP "Not a zip archive" is appropriate.
The file looks like the beginning of a (truncated but otherwise valid) ZIP archive.
In this case, a different error code (eg ZIP_ER_TRUNCATED "Truncated zip archive") would be preferred.
Additional context
Around 2% of all the ZIP archives that are opened by the ChromeOS Files App fail because of the ZIP_ER_NOZIP error. This percentage is stable over time, and it looks quite high. I am wondering if this is due to truncated ZIPs, or if there is another issue at play.
The text was updated successfully, but these errors were encountered:
Description
When
libzip
tries to open an incomplete (truncated) ZIP archive, it fails with the error codeZIP_ER_NOZIP
"Not a zip archive".Solution
Would it be possible to distinguish the two situations by returning different error codes?
In this case
ZIP_ER_NOZIP
"Not a zip archive" is appropriate.In this case, a different error code (eg
ZIP_ER_TRUNCATED
"Truncated zip archive") would be preferred.Additional context
Around 2% of all the ZIP archives that are opened by the ChromeOS Files App fail because of the
ZIP_ER_NOZIP
error. This percentage is stable over time, and it looks quite high. I am wondering if this is due to truncated ZIPs, or if there is another issue at play.The text was updated successfully, but these errors were encountered: