summaryrefslogtreecommitdiffstats
path: root/src/engine/SCons/Node/FS.py
diff options
context:
space:
mode:
authorDirk Baechle <dl9obn@darc.de>2015-02-04 21:07:45 (GMT)
committerDirk Baechle <dl9obn@darc.de>2015-02-04 21:07:45 (GMT)
commit7d89522233802f83ffa728bc0b55785faf580d32 (patch)
treebf9fb8528aa14ad301a2455711e5d671594dd716 /src/engine/SCons/Node/FS.py
parentb2e68f654f456f13ad0ccefc3b09fe55475b1be1 (diff)
downloadSCons-7d89522233802f83ffa728bc0b55785faf580d32.zip
SCons-7d89522233802f83ffa728bc0b55785faf580d32.tar.gz
SCons-7d89522233802f83ffa728bc0b55785faf580d32.tar.bz2
- a few simple refactorings and optimizations
Diffstat (limited to 'src/engine/SCons/Node/FS.py')
-rw-r--r--src/engine/SCons/Node/FS.py12
1 files changed, 1 insertions, 11 deletions
diff --git a/src/engine/SCons/Node/FS.py b/src/engine/SCons/Node/FS.py
index e73dd92..4db1cb3 100644
--- a/src/engine/SCons/Node/FS.py
+++ b/src/engine/SCons/Node/FS.py
@@ -2230,17 +2230,7 @@ class RootDir(Dir):
raise SCons.Errors.UserError(msg)
# There is no Node for this path name, and we're allowed
# to create it.
- # (note: would like to use p.rsplit('/',1) here but
- # that's not in python 2.3)
- # e.g.: dir_name, file_name = p.rsplit('/',1)
- last_slash = p.rindex('/')
- if (last_slash >= 0):
- dir_name = p[:last_slash]
- file_name = p[last_slash+1:]
- else:
- dir_name = p # shouldn't happen, just in case
- file_name = ''
-
+ dir_name, file_name = p.rsplit('/',1)
dir_node = self._lookup_abs(dir_name, Dir)
result = klass(file_name, dir_node, self.fs)