[jhbuild] prevent inserting drive (C:) in the middle of install path



commit 8d12048b17a482a6b27d90e086d21a1b4a5cc453
Author: Marcin Wojdyr <wojdyr gmail com>
Date:   Wed Jul 11 18:55:33 2012 +0100

    prevent inserting drive (C:) in the middle of install path
    
    Make sure that when destdir and prefix are concatated
    prefix is taken without Windows drive.

 jhbuild/modtypes/__init__.py |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/jhbuild/modtypes/__init__.py b/jhbuild/modtypes/__init__.py
index 321d5aa..6e26bed 100644
--- a/jhbuild/modtypes/__init__.py
+++ b/jhbuild/modtypes/__init__.py
@@ -281,7 +281,8 @@ them into the prefix."""
         destdir = self.get_destdir(buildscript)
         self._clean_la_files(buildscript, destdir)
 
-        stripped_prefix = buildscript.config.prefix[1:]
+        prefix_without_drive = os.path.splitdrive(buildscript.config.prefix)[1]
+        stripped_prefix = prefix_without_drive[1:]
 
         previous_entry = buildscript.moduleset.packagedb.get(self.name)
         if previous_entry:



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