FEATURE: 339370
When no unrar installed, Okular now utilizes the program unar for extracting the archive and lsar for listing the content in the archive.
lsar is related and comes with a unar installation.
Details
- Reviewers
aacid - Commits
- R223:4e353aabee36: Add unarchiver support for cbr files
Diff Detail
- Repository
- R223 Okular
- Branch
- unar-patch
- Lint
No Linters Available - Unit
No Unit Test Coverage - Build Status
Buildable 4332 Build 4350: arc lint + arc unit
So there's unar and lsar? What's the difference? Can you add some more text to the summary explaining it?
I'm not thrilled about all these dynamic_cast< UnarFlavour * > in the ifs.
Do you think you could fine a way to extend UnrarFlavour with a few virtuals so instead of ifs you would call functions in the helper that would do the work?
i.e. something like processListing?
Okay, I added the virtual functions and created the ProcessArgs type, for a better structure of the processed arguments.
These variables will then be used by the startSyncProcess function.
This patch doesn't work here.
I do
okular ~/okularfiles/cbr/TREX-BackStory.CBR
and then on Unrar::list
listFile is "TREX-BackStory/00-Cover.jpg", "TREX-BackStory/00-IC-Info.jpg", "TREX-BackStory/01-Father.jpg", "TREX-BackStory/02-House.jpg", "TREX-BackStory/03-cameBack.jpg", "TREX-BackStory/03-Shadow.jpg", "TREX-BackStory/04-Pretty.jpg", "TREX-BackStory/05-RexsTurn.jpg", "TREX-BackStory/06-CreatureFight.jpg", "TREX-BackStory/07-RexPaintMore.jpg", "TREX-BackStory/08-RexBad.jpg", "TREX-BackStory/09-CatfishsDeal.jpg", "TREX-BackStory/10-RexWillHelp.jpg", "TREX-BackStory/11-FixBarn.jpg", "TREX-BackStory/12-StickMan.jpg", "TREX-BackStory/13-Tractor.jpg", "TREX-BackStory/14-ScareCrow.jpg", "TREX-BackStory/15-Weeding.jpg", "TREX-BackStory/16-VeryTired.jpg", "TREX-BackStory/17-NextMorning.jpg", "TREX-BackStory/18-BrerTemphi.jpg", "TREX-BackStory/19-Chaos.jpg", "TREX-BackStory/20-WorldMind.jpg", "TREX-BackStory/21-Problem.jpg", "TREX-BackStory/22-Ancestor.jpg", "TREX-BackStory/23-Cyclotron.jpg", "TREX-BackStory/24-Paintings.jpg", "TREX-BackStory/25-AstroNaught.jpg", "TREX-BackStory/26-Randian.jpg", "TREX-BackStory/26-Warning.jpg", "TREX-BackStory/27-TemphiFading.jpg", "TREX-BackStory/28-CatfishFights.jpg", "TREX-BackStory/29-RexWails.jpg", "TREX-BackStory/30-AstroPunch.jpg", "TREX-BackStory/31-RexAstroFight.jpg", "TREX-BackStory/32-MoreFight.jpg", "TREX-BackStory/33-AstroNaughtLeaves.jpg", "TREX-BackStory/34-RexSorry.jpg", "TREX-BackStory/35-RexLeaves.jpg", "TREX-BackStory/36-Credits.jpg", "TREX-BackStory/37-NMI-Ad.jpg", "TREX-BackStory/38-lettersPage.jpg", "TREX-BackStory/38-SentinelsAd.jpg", "TREX-BackStory/Thumbs.db", "TREX-BackStory/"
but newList is empty
It seems to me that the unar command is expanding the folder while the unrar one is not, and this is causing the problem.
- Fix unar not recognizing subfolder
I think you mean unar is faulty here. Yes, it seems that unar is unable to extract the files in a directory without the subfolder from the archive.
I only tested comics without a subfolder so I didnt't encounterd this problem until now.
The -D option for unar doesn't seem to to anything useful here, so I removed it.