D22786: KTar::openArchive: Don't assert if file has two root dirs
aacid closed this revision. REPOSITORY R243 KArchive REVISION DETAIL https://phabricator.kde.org/D22786 To: aacid, apol, dfaure Cc: dfaure, apol, kde-frameworks-devel, LeGast00n, sbergeron, michaelh, ngraham, bruns
D22786: KTar::openArchive: Don't assert if file has two root dirs
dfaure accepted this revision. This revision is now accepted and ready to land. REPOSITORY R243 KArchive BRANCH arcpatch-D22786 REVISION DETAIL https://phabricator.kde.org/D22786 To: aacid, apol, dfaure Cc: dfaure, apol, kde-frameworks-devel, LeGast00n, sbergeron, michaelh, ngraham, bruns
D22786: KTar::openArchive: Don't assert if file has two root dirs
aacid updated this revision to Diff 62749. aacid added a comment. don't return false on the "two roots scenario" as suggested by dfaure REPOSITORY R243 KArchive CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D22786?vs=62684=62749 BRANCH arcpatch-D22786 REVISION DETAIL https://phabricator.kde.org/D22786 AFFECTED FILES src/karchive_p.h src/ktar.cpp To: aacid, apol, dfaure Cc: dfaure, apol, kde-frameworks-devel, LeGast00n, sbergeron, michaelh, ngraham, bruns
D22786: KTar::openArchive: Don't assert if file has two root dirs
dfaure requested changes to this revision. dfaure added a comment. This revision now requires changes to proceed. 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 REPOSITORY R243 KArchive REVISION DETAIL https://phabricator.kde.org/D22786 To: aacid, apol, dfaure Cc: dfaure, apol, kde-frameworks-devel, LeGast00n, sbergeron, michaelh, ngraham, bruns
D22786: KTar::openArchive: Don't assert if file has two root dirs
apol accepted this revision. This revision is now accepted and ready to land. REPOSITORY R243 KArchive BRANCH master REVISION DETAIL https://phabricator.kde.org/D22786 To: aacid, apol Cc: dfaure, apol, kde-frameworks-devel, LeGast00n, sbergeron, michaelh, ngraham, bruns
D22786: KTar::openArchive: Don't assert if file has two root dirs
aacid created this revision. Herald added a project: Frameworks. Herald added a subscriber: kde-frameworks-devel. aacid requested review of this revision. REVISION SUMMARY 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. REPOSITORY R243 KArchive BRANCH master REVISION DETAIL https://phabricator.kde.org/D22786 AFFECTED FILES src/karchive_p.h src/ktar.cpp To: aacid Cc: kde-frameworks-devel, LeGast00n, sbergeron, michaelh, ngraham, bruns
D22786: KTar::openArchive: Don't assert if file has two root dirs
aacid added subscribers: apol, dfaure. REPOSITORY R243 KArchive REVISION DETAIL https://phabricator.kde.org/D22786 To: aacid Cc: dfaure, apol, kde-frameworks-devel, LeGast00n, sbergeron, michaelh, ngraham, bruns