diff options
author | Simon Hausmann <simon.hausmann@nokia.com> | 2012-05-07 11:21:11 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2012-05-07 11:21:11 +0200 |
commit | 2cf6c8816a73e0132bd8fa3b509d62d7c51b6e47 (patch) | |
tree | 988e8c5b116dd0466244ae2fe5af8ee9be926d76 /Tools/Scripts/webkitpy/common/system/filesystem_mock.py | |
parent | dd91e772430dc294e3bf478c119ef8d43c0a3358 (diff) | |
download | qtwebkit-2cf6c8816a73e0132bd8fa3b509d62d7c51b6e47.tar.gz |
Imported WebKit commit 7e538425aa020340619e927792f3d895061fb54b (http://svn.webkit.org/repository/webkit/trunk@116286)
Diffstat (limited to 'Tools/Scripts/webkitpy/common/system/filesystem_mock.py')
-rw-r--r-- | Tools/Scripts/webkitpy/common/system/filesystem_mock.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Tools/Scripts/webkitpy/common/system/filesystem_mock.py b/Tools/Scripts/webkitpy/common/system/filesystem_mock.py index 2ff688af7..d4a955080 100644 --- a/Tools/Scripts/webkitpy/common/system/filesystem_mock.py +++ b/Tools/Scripts/webkitpy/common/system/filesystem_mock.py @@ -82,6 +82,9 @@ class MockFileSystem(object): return self.normpath(path) return self.abspath(self.join(self.cwd, path)) + def realpath(self, path): + return self.abspath(path) + def basename(self, path): return self._split(path)[1] @@ -129,7 +132,7 @@ class MockFileSystem(object): file_filter = file_filter or filter_all files = [] if self.isfile(path): - if file_filter(self, self.dirname(path), self.basename(path)): + if file_filter(self, self.dirname(path), self.basename(path)) and self.files[path] is not None: files.append(path) return files @@ -149,7 +152,7 @@ class MockFileSystem(object): continue dirpath, basename = self._split(filename) - if file_filter(self, dirpath, basename): + if file_filter(self, dirpath, basename) and self.files[filename] is not None: files.append(filename) return files @@ -275,7 +278,7 @@ class MockFileSystem(object): def normpath(self, path): # This function is called a lot, so we try to optimize the common cases # instead of always calling _slow_but_correct_normpath(), above. - if '..' in path: + if '..' in path or '/./' in path: # This doesn't happen very often; don't bother trying to optimize it. return self._slow_but_correct_normpath(path) if not path: |