diff --git a/patoolib/programs/star.py b/patoolib/programs/star.py index e7ca5c9..5b3abbf 100644 --- a/patoolib/programs/star.py +++ b/patoolib/programs/star.py @@ -48,5 +48,8 @@ def add_star_opts (cmdlist, encoding, verbose): cmdlist.append('-Z') elif encoding == 'bzip2': cmdlist.append('-bz') + elif encoding in ('lzma', 'xz'): + # use compress-program option + cmdlist.append('compress-program=%s' % encoding) if verbose: cmdlist.append('-v') diff --git a/tests/test_archives.py b/tests/test_archives.py index 3b8eb7c..2d9348e 100644 --- a/tests/test_archives.py +++ b/tests/test_archives.py @@ -31,8 +31,8 @@ class TestArchives (ArchiveTest): self.archive_commands('t.tar.Z', cmd) self.archive_commands('t.tar.bz2', cmd) self.archive_commands('t.tbz2', cmd) - # XXXself.archive_commands('t.tar.lzma', cmd) - # XXXself.archive_command('t.tar.xz', cmd) + self.archive_commands('t.tar.lzma', cmd) + self.archive_commands('t.tar.xz', cmd) @needs_cmd('bzip2') def test_bzip2 (self):