소스 검색

Normalize destination paths to Windows style (backslashes)

Closes gh-154
Thomas Kluyver 6 년 전
부모
커밋
3a16d51da8
1개의 변경된 파일4개의 추가작업 그리고 1개의 파일을 삭제
  1. 4 1
      nsist/__init__.py

+ 4 - 1
nsist/__init__.py

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