summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Noel <GregNoel@tigris.org>2008-11-07 01:34:18 (GMT)
committerGreg Noel <GregNoel@tigris.org>2008-11-07 01:34:18 (GMT)
commit3b7f40bc267e149983291e7fde8553eafce9bf8f (patch)
tree6ee91379206d638a56721f4df059212c2d7f274d
parent11bb623a1fe50957b0dcc7ba179933e5ea414cef (diff)
downloadSCons-3b7f40bc267e149983291e7fde8553eafce9bf8f.zip
SCons-3b7f40bc267e149983291e7fde8553eafce9bf8f.tar.gz
SCons-3b7f40bc267e149983291e7fde8553eafce9bf8f.tar.bz2
Issue 2235: File.Dir() creates files in the wrong place
-rw-r--r--src/engine/SCons/Node/FS.py30
1 files changed, 13 insertions, 17 deletions
diff --git a/src/engine/SCons/Node/FS.py b/src/engine/SCons/Node/FS.py
index 3268458..e04bacd 100644
--- a/src/engine/SCons/Node/FS.py
+++ b/src/engine/SCons/Node/FS.py
@@ -1171,7 +1171,7 @@ class FS(LocalFS):
return root._lookup_abs(p, fsclass, create)
def Entry(self, name, directory = None, create = 1):
- """Lookup or create a generic Entry node with the specified name.
+ """Look up or create a generic Entry node with the specified name.
If the name is a relative path (begins with ./, ../, or a file
name), then it is looked up relative to the supplied directory
node, or to the top level directory of the FS (supplied at
@@ -1180,7 +1180,7 @@ class FS(LocalFS):
return self._lookup(name, directory, Entry, create)
def File(self, name, directory = None, create = 1):
- """Lookup or create a File node with the specified name. If
+ """Look up or create a File node with the specified name. If
the name is a relative path (begins with ./, ../, or a file name),
then it is looked up relative to the supplied directory node,
or to the top level directory of the FS (supplied at construction
@@ -1192,7 +1192,7 @@ class FS(LocalFS):
return self._lookup(name, directory, File, create)
def Dir(self, name, directory = None, create = True):
- """Lookup or create a Dir node with the specified name. If
+ """Look up or create a Dir node with the specified name. If
the name is a relative path (begins with ./, ../, or a file name),
then it is looked up relative to the supplied directory node,
or to the top level directory of the FS (supplied at construction
@@ -1367,8 +1367,7 @@ class Dir(Base):
Looks up or creates a directory node named 'name' relative to
this directory.
"""
- dir = self.fs.Dir(name, self, create)
- return dir
+ return self.fs.Dir(name, self, create)
def File(self, name):
"""
@@ -2172,16 +2171,14 @@ class File(Base):
self._morph()
def Entry(self, name):
- """Create an entry node named 'name' relative to
- the SConscript directory of this file."""
- cwd = self.cwd or self.fs._cwd
- return cwd.Entry(name)
+ #"""Create an entry node named 'name' relative to
+ #the directory of this file."""
+ return self.dir.Entry(name)
def Dir(self, name, create=True):
- """Create a directory node named 'name' relative to
- the SConscript directory of this file."""
- cwd = self.cwd or self.fs._cwd
- return cwd.Dir(name, create)
+ #"""Create a directory node named 'name' relative to
+ #the directory of this file."""
+ return self.dir.Dir(name, create=create)
def Dirs(self, pathlist):
"""Create a list of directories relative to the SConscript
@@ -2189,10 +2186,9 @@ class File(Base):
return map(lambda p, s=self: s.Dir(p), pathlist)
def File(self, name):
- """Create a file node named 'name' relative to
- the SConscript directory of this file."""
- cwd = self.cwd or self.fs._cwd
- return cwd.File(name)
+ #"""Create a file node named 'name' relative to
+ #the directory of this file."""
+ return self.dir.File(name)
#def generate_build_dict(self):
# """Return an appropriate dictionary of values for building