diff --git a/doc/changelog.txt b/doc/changelog.txt index 610da98..ce3e0b3 100644 --- a/doc/changelog.txt +++ b/doc/changelog.txt @@ -2,7 +2,7 @@ * Add support for grepping in archive contents. * Fixed Python lzma archive handling. -* Fixed lzop and lrzip archive handling. +* Fixed lzop, lrzip and rzip archive handling. 0.19 "The Kids Are All Right" (released 21.2.2013) diff --git a/patoolib/programs/rzip.py b/patoolib/programs/rzip.py index 5f80a1a..cfb8c0a 100644 --- a/patoolib/programs/rzip.py +++ b/patoolib/programs/rzip.py @@ -13,23 +13,21 @@ # # You should have received a copy of the GNU General Public License # along with this program. If not, see . -"""Archive commands for the lrzip program.""" +"""Archive commands for the rzip program.""" import os from .. import util def extract_rzip (archive, compression, cmd, **kwargs): - """Extract a RZIP archive.""" - # Since extracted files will be placed in the current directory, - # the cwd argument has to be the output directory. + """Extract an RZIP archive.""" cmdlist = [cmd, '-d', '-k'] if kwargs['verbose']: cmdlist.append('-v') outfile = util.get_single_outfile(kwargs['outdir'], archive) - cmdlist.extend(["-o", outfile, os.path.abspath(archive)]) - return (cmdlist, {'cwd': kwargs['outdir']}) + cmdlist.extend(["-o", outfile, archive]) + return cmdlist def create_rzip (archive, compression, cmd, *args, **kwargs): - """Create a RZIP archive.""" + """Create an RZIP archive.""" cmdlist = [cmd, '-k', '-o', archive] if kwargs['verbose']: cmdlist.append('-v') diff --git a/tests/archives/test_rzip.py b/tests/archives/test_rzip.py index 4a66490..691d011 100644 --- a/tests/archives/test_rzip.py +++ b/tests/archives/test_rzip.py @@ -22,10 +22,10 @@ class TestRzip (ArchiveTest): @needs_program(program) def test_rzip(self): - self.archive_extract('t.txt.rz') + self.archive_extract('t.txt.rz', check=Content.Singlefile) self.archive_create('t.txt.rz', check=Content.Singlefile) @needs_program(program) def test_rzip_file(self): - self.archive_extract('t.txt.rz.foo') + self.archive_extract('t.txt.rz.foo', check=Content.Singlefile) diff --git a/tests/data/t.txt.rz b/tests/data/t.txt.rz index e070832..7f2c097 100644 Binary files a/tests/data/t.txt.rz and b/tests/data/t.txt.rz differ diff --git a/tests/data/t.txt.rz.foo b/tests/data/t.txt.rz.foo index e070832..7f2c097 100644 Binary files a/tests/data/t.txt.rz.foo and b/tests/data/t.txt.rz.foo differ