| Index: chrome/common/extensions/docs/server2/empty_dir_file_system.py
|
| diff --git a/chrome/common/extensions/docs/server2/empty_dir_file_system.py b/chrome/common/extensions/docs/server2/empty_dir_file_system.py
|
| index 58053a80f57f50e8413797ff8d1ccdcd0cc6ce3c..24a5a26fe32c5642fbaf56dd825828c4f9171080 100644
|
| --- a/chrome/common/extensions/docs/server2/empty_dir_file_system.py
|
| +++ b/chrome/common/extensions/docs/server2/empty_dir_file_system.py
|
| @@ -4,6 +4,8 @@
|
|
|
| from file_system import FileNotFoundError, FileSystem, StatInfo
|
| from future import Future
|
| +from path_util import IsDirectory
|
| +
|
|
|
| class EmptyDirFileSystem(FileSystem):
|
| '''A FileSystem with empty directories. Useful to inject places to disable
|
| @@ -12,7 +14,7 @@ class EmptyDirFileSystem(FileSystem):
|
| def Read(self, paths):
|
| result = {}
|
| for path in paths:
|
| - if not path.endswith('/'):
|
| + if not IsDirectory(path):
|
| raise FileNotFoundError('EmptyDirFileSystem cannot read %s' % path)
|
| result[path] = []
|
| return Future(value=result)
|
| @@ -21,7 +23,7 @@ class EmptyDirFileSystem(FileSystem):
|
| return Future(value=())
|
|
|
| def Stat(self, path):
|
| - if not path.endswith('/'):
|
| + if not IsDirectory(path):
|
| raise FileNotFoundError('EmptyDirFileSystem cannot stat %s' % path)
|
| return StatInfo(0, child_versions=[])
|
|
|
|
|