From 74ce76bf1282b460d0d195283770172d6a342282 Mon Sep 17 00:00:00 2001 From: Nabil Ghodbane Date: Wed, 4 Sep 2019 12:19:37 +0200 Subject: [PATCH] =?utf8?q?correction=20bug=20li=C3=A9=20=C3=A0=207z=20qui?= =?utf8?q?=20se=20perd=20si=20l'extension=20de=20l'archive=20est=20.tgz?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- commands/package.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/commands/package.py b/commands/package.py index 0a1c84a..57bd9d7 100644 --- a/commands/package.py +++ b/commands/package.py @@ -903,7 +903,11 @@ def make_archive(prod_name, prod_info, where): :return: The path of the resulting archive :rtype: str ''' - path_targz_prod = os.path.join(where, prod_name + ".tgz") + if src.architecture.is_windows(): + ext = '.tar.gz' # using tgz for windows, raises error messages with 7z + else: + ext = '.tgz' + path_targz_prod = os.path.join(where, prod_name + ext) tar_prod = tarfile.open(path_targz_prod, mode='w:gz') local_path = prod_info.source_dir tar_prod.add(local_path, @@ -1488,7 +1492,11 @@ Please add it in file: logger.write("\n", 1) return 1 - path_targz = os.path.join(dir_name, archive_name + ".tgz") + if src.architecture.is_windows(): + ext = '.tar.gz' # using tgz for windows, raises error messages with 7z + else: + ext = '.tgz' + path_targz = os.path.join(dir_name, archive_name + ext) src.printcolors.print_value(logger, "Package path", path_targz, 2) -- 2.39.2