Explorar el Código

Fixed a bug that was occuring when removing destination files.

repsac hace 10 años
padre
commit
ee3898e18a
Se han modificado 1 ficheros con 3 adiciones y 1 borrados
  1. 3 1
      utils/exporters/blender/addons/io_three/exporter/io.py

+ 3 - 1
utils/exporters/blender/addons/io_three/exporter/io.py

@@ -14,10 +14,12 @@ def copy_registered_textures(dest, registration):
 
 def copy(src, dst):
     logger.debug('io.copy(%s, %s)' % (src, dst))
-    if os.path.exists(dst) and os.path.isfile(src):
+    if os.path.isfile(src):
         file_name = os.path.basename(src)
         dst = os.path.join(dst, file_name)
 
+    if os.path.exists(dst):
+
         logger.info('Destination file exists, attempting to remove %s', dst)
         try:
             os.remove(dst)