From 895197e12092575f6c4849f4d62f564ec51ec979 Mon Sep 17 00:00:00 2001 From: Bastian Kleineidam Date: Wed, 10 Nov 2010 19:50:19 +0100 Subject: [PATCH] Fix rar extraction unpack directory. --- doc/changelog.txt | 1 + patoolib/programs/rar.py | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/doc/changelog.txt b/doc/changelog.txt index 65d183a..3376737 100644 --- a/doc/changelog.txt +++ b/doc/changelog.txt @@ -1,6 +1,7 @@ 0.12 "" (released xx.xx.2010) * Show commands that are run. + * Fix rar extraction unpack directory. 0.11 "Primer" (released 4.10.2010) diff --git a/patoolib/programs/rar.py b/patoolib/programs/rar.py index c87f2fb..01de315 100644 --- a/patoolib/programs/rar.py +++ b/patoolib/programs/rar.py @@ -14,14 +14,15 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . """Archive commands for the rar program.""" +import os def extract_rar (archive, encoding, cmd, **kwargs): """Extract a RAR archive.""" cmdlist = [cmd, 'x'] if not kwargs['verbose']: cmdlist.append('-c-') - cmdlist.extend(['-r', '--', archive, kwargs['outdir']]) - return cmdlist + cmdlist.extend(['-r', '--', os.path.abspath(archive)]) + return (cmdlist, {'cwd': kwargs['outdir']}) def list_rar (archive, encoding, cmd, **kwargs): """List a RAR archive."""