Ver código fonte

Normalize destination paths to Windows style (backslashes)

Closes gh-154
Thomas Kluyver 6 anos atrás
pai
commit
3a16d51da8
1 arquivos alterados com 4 adições e 1 exclusões
  1. 4 1
      nsist/__init__.py

+ 4 - 1
nsist/__init__.py

@@ -393,7 +393,10 @@ if __name__ == '__main__':
             file = file.rstrip('/\\')
             basename = os.path.basename(file)
 
-            if not destination:
+            if destination:
+                # Normalize destination paths to Windows-style
+                destination = destination.replace('/', '\\')
+            else:
                 destination = '$INSTDIR'
 
             if os.path.isdir(file):