From 021ed8ef6e5d489aad7a11a707023fb8eb29f204 Mon Sep 17 00:00:00 2001 From: Steven Knight Date: Thu, 1 Jan 2009 18:36:08 +0000 Subject: Have the {Append,Prepend}ENVPath() canonicalization make sure there's the string is non-null before checking whether the first character is '#'. --- src/CHANGES.txt | 5 +++++ src/engine/SCons/Environment.py | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) 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 -- cgit v0.12