]> SALOME platform Git repositories - tools/sat.git/commitdiff
Salome HOME
correction bug lié à 7z qui se perd si l'extension de l'archive est .tgz ng780475/scs13189_windows
authorNabil Ghodbane <nabil.ghodbane@cea.fr>
Wed, 4 Sep 2019 10:19:37 +0000 (12:19 +0200)
committerNabil Ghodbane <nabil.ghodbane@cea.fr>
Wed, 4 Sep 2019 10:19:37 +0000 (12:19 +0200)
commands/package.py

index 0a1c84aaa53f05f7f38b349033e397d1e9df9994..57bd9d7892d4cc549c47e0d9a7bbf0219bbca7bd 100644 (file)
@@ -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)