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."""