[jhbuild] build: Don't choke on Windows with PATH containing '.'



commit cf1178fba2bd911cd7f72190e7b075241b3be21b
Author: Damien Lespiau <damien lespiau intel com>
Date:   Sun Mar 13 14:00:26 2011 +0000

    build: Don't choke on Windows with PATH containing '.'
    
    To access path[1] it needs to exist.

 jhbuild/config.py |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/jhbuild/config.py b/jhbuild/config.py
index 4e093c4..f13e303 100644
--- a/jhbuild/config.py
+++ b/jhbuild/config.py
@@ -108,7 +108,8 @@ def addpath(envvar, path):
             if sys.platform.startswith('win'):
                 path = jhbuild.utils.subprocess_win32.fix_path_for_msys(path)
 
-            if sys.platform.startswith('win') and path[1]==':':
+            if sys.platform.startswith('win') and len(path) > 1 and \
+               path[1] == ':':
                 # Windows: Don't allow c:/ style paths in :-separated env vars
                 # for obvious reasons. /c/ style paths are valid - if a var is
                 # separated by : it will only be of interest to programs inside



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]