summaryrefslogtreecommitdiffstats
path: root/tests/auto/installer/libarchivearchive
Commit message (Collapse)AuthorAgeFilesLines
* Fix extracting entries with file paths that contain unicode charactersArttu Tarkiainen2022-02-171-5/+61
| | | | | | | | | | | | Libarchive stores most paths internally in a multistring that can contain a combination of a wide character string, multibyte string in current locale or unicode string encoded as UTF-8. Try to retrieve and set a variant of the string with the correct encoding when converting libarchive strings to/from Qt string classes. Task-number: QTIFW-2506 Change-Id: I7e7c1e3c5709b669df68b2f3918789ad4ebe4f13 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* ArchiveFactory: register handlers for .qbsp file extensionArttu Tarkiainen2022-01-113-0/+3
| | | | | | | | | | | QBSP archives were missing a handler which caused UnzipArchiveTask to fail when fetching metadata. Also fix the resulted segfault in UnzipArchiveTask::doTask() when ArchiveFactory::create() returns nullptr for unknown file extension - it now handles the exception properly. Task-number: QTIFW-2475 Change-Id: I72624763a06d6e7495daebd69970a5f22a4fd6d3 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Libarchive: enable support for uncompressed tar archivesArttu Tarkiainen2021-12-091-0/+1
| | | | | | | Task-number: QTIFW-2404 Change-Id: I4c62d283d54a1f180f9c3525da0728a1c75ef50e Reviewed-by: Iikka Eklund <iikka.eklund@qt.io> Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Enable handling 7z archives with libarchiveArttu Tarkiainen2021-12-093-0/+3
| | | | | | | | | | | | | | Make libarchive the default handler for 7z archives if the IFW tools were built with the 'libarchive' configuration feature. The LZMA SDK library is still built and can be used instead if the config feature is omitted. Also modify tests. Task-number: QTIFW-2375 Change-Id: I1091d5fa140cbd783cddecc595f35c6562639b07 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Libarchive: fix handling of glob pattern arguments when creating archiveArttu Tarkiainen2021-12-031-0/+32
| | | | | | | | | Arguments with wildcards were not working if archivegen was called from somewhere else than shell, like from within a Python script. Task-number: QTIFW-2423 Change-Id: Icf6d6c3c45ad9050a03c1a3dd7c4d9f10d1f3be6 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Fix creating archives containing Windows shortcutsArttu Tarkiainen2021-10-291-0/+56
| | | | | | | | | | | | | On Windows, QFileInfo::isSymLink() returns true for *.lnk files, which unlike symlinks contain data - when creating an archive the writing was incorrectly skipped. Also add test case for creating and extracting archives containing either symlinks or shortcuts. Change-Id: I3ebbd28e889ffa17ece7378c3812244a55df20d5 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Add support for seeking files handled with libarchiveArttu Tarkiainen2021-10-261-10/+2
| | | | | | | | | | | | | | | | | | | This fixes losing executable bits of files in Zip archives when extracted. Zip archives store file metadata in two ways, partial metadata per-entry and full metadata at the end of archive. IFW's read implementation previously did only streaming without support for seeking archives, which is required to obtain full metadata - meaning the partial metadata was used instead by libarchive's Zip reader. The extracted entries between the two metadata types are not consistent. This change also enables usage of archive formats that cannot be accurately handled with a streaming model, like 7zip which needs to read key data from the end of the file before reading file data from the beginning. Task-number: QTIFW-2372 Change-Id: Ie4ed33040fc52de073546e46d9da726816f47a81 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Add tests for the new archive handling classesArttu Tarkiainen2021-09-147-0/+212
Change-Id: I1e3a91fd0722b0b73197257ec5092a617b41516e Reviewed-by: Katja Marttila <katja.marttila@qt.io>