Fix extraction when an archive has a percentage in the name
ClosedPublic

Authored by elvisangelaccio on Jul 19 2016, 8:21 PM.

Details

Summary

If an archive's filename has a percentage character (%), QUrl::toDisplayString() results in a QString containing %25 instead of %,
breaking a lot of stuff. Porting to QUrl::toLocalFile() fixes this issue (bug 365798).

A similar fix should be applied also to AddToArchive jobs.

Test Plan

BatchExtract job is unit tested.

Normal extraction to a subfolder with percentage in the name also work as
expected.

Diff Detail

Repository
R36 Ark
Branch
tests/batchextract
Lint
No Linters Available
Unit
No Unit Test Coverage
elvisangelaccio retitled this revision from to Fix extraction when an archive has a percentage in the name.
elvisangelaccio updated this object.
elvisangelaccio edited the test plan for this revision. (Show Details)
elvisangelaccio added a reviewer: rthomsen.
Restricted Application added a project: Ark. · View Herald TranscriptJul 19 2016, 8:21 PM
Restricted Application added a subscriber: kde-utils-devel. · View Herald Transcript
rthomsen added inline comments.Jul 20 2016, 9:34 AM
autotests/app/batchextracttest.cpp
80 ↗(On Diff #5334)

Should we add QDir::Hidden here, in case we include test archives with hidden files in the future?

  • Add also QDir::Hidden
elvisangelaccio marked an inline comment as done.Jul 20 2016, 11:34 AM
rthomsen accepted this revision.Jul 20 2016, 4:26 PM
rthomsen edited edge metadata.

Nice work! :)

This revision is now accepted and ready to land.Jul 20 2016, 4:26 PM