From: allfro Date: Fri, 15 Feb 2013 00:07:23 +0000 (-0500) Subject: Fixed bug in windows install-package command. X-Git-Url: https://git.nothing2do.fr/?a=commitdiff_plain;h=dbee1aface0c2e5f8132a18f16730034de13c8d9;p=get-hack-src.git Fixed bug in windows install-package command. makedirs was broken because of volume name breaking os.path.join. --- diff --git a/src/canari/commands/install_package.py b/src/canari/commands/install_package.py index fb6ed52..4478d71 100644 --- a/src/canari/commands/install_package.py +++ b/src/canari/commands/install_package.py @@ -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):