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',
Log in to post a comment.