Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(501)

Unified Diff: chrome/common/extensions/docs/server2/compiled_file_system.py

Issue 151883009: Docserver: Make MockFileSystem not iterate over the entire file system as part (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: yoz and then some Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
This is Rietveld 408576698