From dbee1aface0c2e5f8132a18f16730034de13c8d9 Mon Sep 17 00:00:00 2001 From: allfro Date: Thu, 14 Feb 2013 19:07:23 -0500 Subject: [PATCH] Fixed bug in windows install-package command. makedirs was broken because of volume name breaking os.path.join. --- src/canari/commands/install_package.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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): -- 2.45.1