Have the {Append,Prepend}ENVPath() canonicalization make sure there's the
authorstevenknight <stevenknight@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Thu, 1 Jan 2009 18:36:08 +0000 (18:36 +0000)
committerstevenknight <stevenknight@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Thu, 1 Jan 2009 18:36:08 +0000 (18:36 +0000)
string is non-null before checking whether the first character is '#'.

git-svn-id: http://scons.tigris.org/svn/scons/trunk@3868 fdb21ef1-2011-0410-befe-b5e4ea1792b1

src/CHANGES.txt
src/engine/SCons/Environment.py

index d5e1bf9f551653403a05cce288bf346d31a0b019..c525a843b19fb0798386531f17f12ce89804c179 100644 (file)
@@ -25,6 +25,11 @@ RELEASE 1.X - XXX
 
     - Document TestCommon.shobj_prefix variable.
 
+  From Gary Oberbrunner:
+
+    - Allow AppendENVPath() and PrependENVPath() to interpret '#'
+      for paths relative to the top-level SConstruct directory.
+
   From Greg Spencer:
 
     - Support implicit dependency scanning of files encoded in utf-8
index c2a7c76abba30a223e9168c87a08f4cc810cb2ae..338ed37f81a963d5b5a8e61971addeaafacc13e4 100644 (file)
@@ -1203,7 +1203,7 @@ class Base(SubstitutionEnvironment):
     def _canonicalize(self, path):
         if not SCons.Util.is_String(path): # typically a Dir
             path = str(path)
-        if path[0] == '#':
+        if path and path[0] == '#':
             path = str(self.fs.Dir(path))
         return path