Browse Source

Fixed a bug that was occuring when removing destination files.

repsac 10 years ago
parent
commit
ee3898e18a
1 changed files with 3 additions and 1 deletions
  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)