#104 please use unrar x -kb (keep broken)

closed-fixed
None
5
2009-04-07
2009-02-25
No

unrar (Alexander Roshal's non-free version) defaults to unlinking files that fail the CRC check after extraction. I find comix very useful for previewing archives of images while I'm downloading them, and unrar x -kb works fine.

On damaged archives,
rar r foo.rar && unrar x -kb rebuilt.foo.rar
will get more files, but users can do that themselves when they're dealing with broken archives.

BTW, comix 4.0 is nicer for this than comix 3.6. Explicitly extracting files listed by unrar vb is a lot more useful when previewing a bit of a multi-volume rar archive. (comix 3.6 let unrar extract until it ran out of volumes, so you didn't know what volume the images you're looking at were actually in.)

Here's a patch for unrar x -kb:
I don't know how readable this is. I just put '-kb' into the arg list for unrar, and removed -inul, since I want to see what unrar complains about. (I'm a command line guy, so I always run comix.py from a terminal.)

--- archive.py~ 2008-12-22 07:14:14.000000000 -0400
+++ archive.py 2009-02-24 19:10:07.879849429 -0400
@@ -173,8 +173,9 @@
print '! Non-local tar member:', name, '\n'
elif self._type == RAR:
if _rar_exec is not None:
- proc = process.Process([_rar_exec, 'x', '-p-', '-o-',
- '-inul', '--', self._src, name, self._dst])
+ proc = process.Process([_rar_exec, 'x', '-kb', '-p-', '-o-',
+ '--', self._src, name, self._dst])
+ # '-inul',
proc.spawn()
proc.wait()
else:

Discussion

  • Pontus Ekberg

    Pontus Ekberg - 2009-02-28
    • assigned_to: nobody --> herrekberg
     
  • Pontus Ekberg

    Pontus Ekberg - 2009-02-28

    Hi,

    thanks for the tip, I wasn't aware of that flag at all. I'll add it to the main branch, though I think I'll keep -inul since unrar sometimes prints out messages that could make people worry though nothing is really wrong (or at least it seems to do so for me).

     
  • Pontus Ekberg

    Pontus Ekberg - 2009-04-07
    • status: open --> closed-fixed
     
  • Pontus Ekberg

    Pontus Ekberg - 2009-04-07

    This is fixed as of version 4.0.4.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks