Index: chrome/common/extensions/docs/server2/compiled_file_system.py |
diff --git a/chrome/common/extensions/docs/server2/compiled_file_system.py b/chrome/common/extensions/docs/server2/compiled_file_system.py |
index ee86e615e825c9ea6e46ff5d1750c2bce7923efb..a6b4d9a22e8a7c2b4cb2aea14c7aabe9772139ef 100644 |
--- a/chrome/common/extensions/docs/server2/compiled_file_system.py |
+++ b/chrome/common/extensions/docs/server2/compiled_file_system.py |
@@ -8,6 +8,7 @@ import schema_util |
from docs_server_utils import ToUnicode |
from file_system import FileNotFoundError |
from future import Gettable, Future |
+from path_util import ToDirectory |
from third_party.handlebar import Handlebar |
from third_party.json_schema_compiler import json_parse |
from third_party.json_schema_compiler.memoize import memoize |
@@ -225,8 +226,8 @@ class CompiledFileSystem(object): |
'''Calls |compilation_function| on the listing of the files at |path|. |
Assumes that the path given is to a directory. |
''' |
- if not path.endswith('/'): |
- path += '/' |
+ # TODO(kalman): assert IsDirectory(path) |
+ path = ToDirectory(path) |
try: |
version = self._file_system.Stat(path).version |