some zip files apparently can have duplicate entry names, which weren't handled correctly.
Details
- Reviewers
dfaure - Group Reviewers
Frameworks - Commits
- R243:6736aca49c2d: karchive, kzip: try to handle duplicate files in a bit nicer way
created a unit test in a separate commit.
Diff Detail
- Repository
- R243 KArchive
- Lint
Lint Skipped - Unit
Unit Tests Skipped
src/karchive.cpp | ||
---|---|---|
832–833 | Haven't looked at the code yet, but this doesn't make much sense. Maybe this should remove the return then. |
handle stuff a bit prettier. I don't think there's a "right" way to handle this, so parsing is a bit best-effort, but at least it doesn't crash anymore.
src/karchive.cpp | ||
---|---|---|
829–831 | Cache the value not to query twice? |
Thanks for the fix!
src/karchive.cpp | ||
---|---|---|
471 | Please remove this warning, it's ambiguous at this point what the problem is; better have only one clear warning once we know which case we're in. | |
472 | You can remove this if(), every entry is either a file or a directory, by design. | |
475 | Obviously that means mentioning "path" in this warning, something about that file being a duplicate. | |
480 | If this can happen, since there's no data loss, maybe a qCDebug is enough? | |
src/kzip.cpp | ||
756 ↗ | (On Diff #27286) | Use multi-arg to avoid issues in case one of these strings contains %1. .arg(entryName, path, path) |