By default, Bugzilla does not search the list of RESOLVED bugs.
You can force it to do so by putting the upper-case word ALL in front of your search query, e.g.: ALL tdelibs
We recommend searching for bugs this way, as you may discover that your bug has already been resolved and fixed in a later release.
Bug 2541 - ark rar improvements: fix support with rar utilities v5.x and improve listing of folders
Summary: ark rar improvements: fix support with rar utilities v5.x and improve listing...
Status: RESOLVED FIXED
Alias: None
Product: TDE
Classification: Unclassified
Component: tdeutils (show other bugs)
Version: R14.1.x [Trinity]
Hardware: Other Linux
: P5 normal
Assignee: Michele Calgaro
URL:
Depends on:
Blocks: R14.0.4
  Show dependency treegraph
 
Reported: 2015-10-23 04:31 CDT by Fabio Rossi
Modified: 2016-04-23 07:27 CDT (History)
3 users (show)

See Also:
Compiler Version:
TDE Version String:
Application Version:
Application Name:


Attachments
ark-3.5.10.patch (4.77 KB, patch)
2015-10-23 04:31 CDT, Fabio Rossi
Details | Diff
ark-3.5.10.patch (4.79 KB, patch)
2015-10-26 16:46 CDT, Fabio Rossi
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Fabio Rossi 2015-10-23 04:31:55 CDT
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
Comment 1 Michele Calgaro 2015-10-23 10:09:48 CDT
Ciao Fabio,
thanks for the patch. 
This is a good bug to fix for R14.1.0
Comment 2 Fabio Rossi 2015-10-26 16:46:34 CDT
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.
Comment 3 Michele Calgaro 2016-04-21 03:08:38 CDT
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/)
Comment 4 Fabio Rossi 2016-04-21 05:17:22 CDT
(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.
Comment 5 Michele Calgaro 2016-04-22 04:44:55 CDT
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.
Comment 6 Michele Calgaro 2016-04-22 07:12:44 CDT
Bug will be added in R14.0.4, not in R14.1.0 as initially though.
The code change involved is quite small.
Comment 7 Michele Calgaro 2016-04-23 07:26:32 CDT
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!
Comment 8 Michele Calgaro 2016-04-23 07:27:58 CDT
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.