Skip to content

Commit

Permalink
Keep files when extracting broken RAR archives
Browse files Browse the repository at this point in the history
  • Loading branch information
wummel committed Nov 4, 2024
1 parent 1b5b507 commit d4627e0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions doc/changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* If the MIME database cannot detect the file type, check again with a lowercase filenanme extension.
* Use 7z option -aou to rename files when extracting instead of overwriting them.
* Use rar option -or to rename files when extracting instead of overwriting them.
* Use rar option -kb to keep files when extracting broken RAR archives.

3.0.2 (released 21.10.2024)
* When running in verbose mode (-vv), print mime and compression info.
Expand Down
2 changes: 1 addition & 1 deletion patoolib/programs/rar.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def extract_rar(
cmdlist.extend(['-p-', '-y'])
if password:
cmdlist.append(f'-p{password}')
cmdlist.extend(['-or', '--', os.path.abspath(archive)])
cmdlist.extend(['-kb', '-or', '--', os.path.abspath(archive)])
return (cmdlist, {'cwd': outdir})


Expand Down

0 comments on commit d4627e0

Please sign in to comment.