From ef2df71dbbc5a3b703f62b4753ba30d3cbfc5f9a Mon Sep 17 00:00:00 2001 From: easyw Date: Tue, 13 Apr 2021 15:56:31 +0200 Subject: [PATCH] allowing to export stZ files on different drivers os.rename() doesn't move its actual data on the disk shutil.move() method allows to transfer files between two different drives --- src/Mod/Import/stepZ.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Mod/Import/stepZ.py b/src/Mod/Import/stepZ.py index fca2d48150..afec487d45 100644 --- a/src/Mod/Import/stepZ.py +++ b/src/Mod/Import/stepZ.py @@ -20,8 +20,9 @@ import ImportGui import PySide from PySide import QtGui, QtCore import tempfile +import shutil -___stpZversion___ = "1.3.7" +___stpZversion___ = "1.3.8" # support both gz and zipfile archives # Catia seems to use gz, Inventor zipfile # improved import, open and export @@ -175,10 +176,10 @@ def export(objs,filename): f_out.close() if os.path.exists(outfpath): os.remove(outfpath) - os.rename(outfpathT_str, outfpath) + shutil.move(outfpathT_str, outfpath) #os.remove(outfpathT_stp) else: - os.rename(outfpathT_str, outfpath) + shutil.move(outfpathT_str, outfpath) #os.remove(outfpathT_stp) ####