From 9d5ea703bb1e31c9113556efe396f09edd3b0e97 Mon Sep 17 00:00:00 2001 From: stevenknight Date: Thu, 1 Jan 2009 18:36:08 +0000 Subject: [PATCH] Have the {Append,Prepend}ENVPath() canonicalization make sure there's the 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 | 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 d5e1bf9f..c525a843 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 c2a7c76a..338ed37f 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 -- 2.26.2