From b82676b8eec35313896614aa0fb5fdeeddacf541 Mon Sep 17 00:00:00 2001 From: guerler Date: Tue, 28 Nov 2017 12:36:30 -0500 Subject: [PATCH] Switch to transparent readmode for history tarfiles --- lib/galaxy/tools/imp_exp/unpack_tar_gz_archive.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/galaxy/tools/imp_exp/unpack_tar_gz_archive.py b/lib/galaxy/tools/imp_exp/unpack_tar_gz_archive.py index c8562f959d4..8dcf8b9b4b9 100644 --- a/lib/galaxy/tools/imp_exp/unpack_tar_gz_archive.py +++ b/lib/galaxy/tools/imp_exp/unpack_tar_gz_archive.py @@ -49,7 +49,7 @@ def check_archive(archive_file, dest_dir): Ensure that a tar archive has no absolute paths or relative paths outside the archive. """ - with tarfile.open(archive_file, mode='r:gz') as archive_fp: + with tarfile.open(archive_file, mode='r') as archive_fp: for arc_path in archive_fp.getnames(): assert os.path.normpath( os.path.join( @@ -64,7 +64,7 @@ def unpack_archive(archive_file, dest_dir): """ Unpack a tar and/or gzipped archive into a destination directory. """ - archive_fp = tarfile.open(archive_file, mode='r:gz') + archive_fp = tarfile.open(archive_file, mode='r') archive_fp.extractall(path=dest_dir) archive_fp.close()