| Summary: | ark rar improvements: fix support with rar utilities v5.x and improve listing of folders | ||
|---|---|---|---|
| Product: | TDE | Reporter: | Fabio Rossi <rossi.f> |
| Component: | tdeutils | Assignee: | Michele Calgaro <michele.calgaro> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | bugwatch, michele.calgaro, rossi.f |
| Priority: | P5 | ||
| Version: | R14.1.x [Trinity] | ||
| Hardware: | Other | ||
| OS: | Linux | ||
| Compiler Version: | TDE Version String: | ||
| Application Version: | Application Name: | ||
| Bug Depends on: | |||
| Bug Blocks: | 2575 | ||
| Attachments: |
ark-3.5.10.patch
ark-3.5.10.patch |
||
Ciao Fabio, thanks for the patch. This is a good bug to fix for R14.1.0 Created attachment 2586 [details]
ark-3.5.10.patch
slightly improved the patch:
* to better detect folders in the listing, now when the CRC is 0000000
* to work with latest beta version v.5.30beta5 of (un)rar where the header line format is changed again ...
Today I have found a bug in (un)rar, fixed now in its latest release, where the latest folder names in the listing can have a variable number of trailing white spaces. Ideally one could strip the white spaces from the folder names but this behaviour might introduce another subtle bug in the case the archived folder has really trailing whitespaces ... This makes difficult to match folder names without adding much more code so I don't know if it really make sense to change so much the code for this cosmetic problem.
So basically with the patch all the folders are now properly listed, it might happen to not have infos about a folder due the trailing whitespaces added by the (un)rar utility. The problem is finally gone with latest version of (un)rar tool.
Hi Fabio, I will push your patch after reviewing it. Just to make sure, the patch is fully your own work, right? (see the CLA section on the main TDE website for more details https://www.trinitydesktop.org/cla/) (In reply to Michele Calgaro from comment #3) > Hi Fabio, > I will push your patch after reviewing it. > Just to make sure, the patch is fully your own work, right? (see the CLA > section on the main TDE website for more details > https://www.trinitydesktop.org/cla/) Yes, I confirm that the patch is fully my work. Thanks Fabio :-) Problem confirmed and easily reproducible when installing rar 4.x. Starting from Fabio patch, I will prepare a fix that will support both rar4.x and rar5.x since some old distros may not have switched to rar 5.x. Bug will be added in R14.0.4, not in R14.1.0 as initially though. The code change involved is quite small. Fixed in commits 4e99fc3, 0581763 (R14.1.x) and 0123b07, 1ac492f (R14.0.x). Thanks to Fabio for submitting the patch. Feel free to submit more if you want :-) Grazie! By the way I also "fixed" the trailing space issue, i.e. I compare against both the normal name and the one stripped of trailing whitespaces. That should work in 99.999999% of cases. |
Created attachment 2585 [details] ark-3.5.10.patch With the proposed patch against HEAD I have fixed two issues. * The latest (un)rar utilities v5.x doesn't work anymore with ark so the rar support is missing (ideally the program should identify the version of the utilities and change its behaviour accordingly but I don't use older versions) * The listing of rar contents in the arkwidget doesn't show properly the directories infos because the (un)rar utilities list this kind of information after all the files. This means that when a file is added to the listview, the items representing the folders don't show infos. I have added an additional FileListView::updateItem() function to fill the missing infos updating the item later in the processing of the (un)rar utilities dump