]> git.nothing2do.fr Git - get-hack-src.git/commitdiff
Fixed bug in windows install-package command.
authorallfro <ndouba@gmail.com>
Fri, 15 Feb 2013 00:07:23 +0000 (19:07 -0500)
committerallfro <ndouba@gmail.com>
Fri, 15 Feb 2013 00:07:23 +0000 (19:07 -0500)
makedirs was broken because of volume name breaking os.path.join.

src/canari/commands/install_package.py

index fb6ed5289abc7e07b69de2c11d1abaf99b532a86..4478d71926e97693d3cb97294fe132fd95398ba5 100644 (file)
@@ -271,12 +271,17 @@ def installmachines(package, prefix):
 
 
 def makedirs(working_dir):
-    name = os.sep
-    for i in working_dir.split(os.sep):
+    name = ''
+    if os.name != 'nt':
+        name = os.sep
+    for l, i in enumerate(working_dir.split(os.sep)):
         name = os.path.join(name, i)
+        if name.endswith(':') and not l and os.name == 'nt':
+            name = '%s%s' % (name, os.sep)
         if not os.path.exists(name):
             os.mkdir(name, 0755)
 
+
 # Main
 def run(args):