I was wondering if adding this check in KArchive::setRootDir
instead but i ended doing it here since i think an assert in setRootDir is
valid for when C++ users of that class do it wrong.
Details
Details
Diff Detail
Diff Detail
- Repository
- R243 KArchive
- Branch
- arcpatch-D22786
- Lint
No Linters Available - Unit
No Unit Test Coverage - Build Status
Buildable 14547 Build 14565: arc lint + arc unit
Comment Actions
Let's be tolerant and skip the second root dir (with a warning, but without return false). This would be more in line with what we do in case of duplicated subdirs, and with what tar does.
Testcase:
mkdir /tmp/tar touch /tmp/tar/file cd /tmp/tar tar cf /tmp/tar.tar.gz . . tar tf /tmp/tar.tar.gz ./ ./file ./tar.tar.gz ./ ./file ./tar.tar.gz (back to karchive builddir) bin/ktartest /tmp/tar.tar.gz -> ASSERT