summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2009-01-01 18:36:08 (GMT)
committerSteven Knight <knight@baldmt.com>2009-01-01 18:36:08 (GMT)
commit021ed8ef6e5d489aad7a11a707023fb8eb29f204 (patch)
tree7b719e56be4710f6c185bbffbbd4e34100a268bf
parente40b2b0ff3c82d704867a99662ebaad0597f0990 (diff)
downloadSCons-021ed8ef6e5d489aad7a11a707023fb8eb29f204.zip
SCons-021ed8ef6e5d489aad7a11a707023fb8eb29f204.tar.gz
SCons-021ed8ef6e5d489aad7a11a707023fb8eb29f204.tar.bz2
Have the {Append,Prepend}ENVPath() canonicalization make sure there's the
string is non-null before checking whether the first character is '#'.
-rw-r--r--src/CHANGES.txt5
-rw-r--r--src/engine/SCons/Environment.py2
2 files changed, 6 insertions, 1 deletions
diff --git a/src/CHANGES.txt b/src/CHANGES.txt
index d5e1bf9..c525a84 100644
--- a/src/CHANGES.txt
+++ b/src/CHANGES.txt
@@ -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
diff --git a/src/engine/SCons/Environment.py b/src/engine/SCons/Environment.py
index c2a7c76..338ed37 100644
--- a/src/engine/SCons/Environment.py
+++ b/src/engine/SCons/Environment.py
@@ -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