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

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

Issue 437323003: Docserver: Factor SamplesModel out of SamplesDataSource (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 4 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 2f7769e961f3be068f0a8c082803182998f6ea90..58ab967240dd191cd3200c8cc9cbde0bf4ae9182 100644
--- a/chrome/common/extensions/docs/server2/compiled_file_system.py
+++ b/chrome/common/extensions/docs/server2/compiled_file_system.py
@@ -8,7 +8,7 @@ import schema_util
from docs_server_utils import ToUnicode
from file_system import FileNotFoundError
from future import Future
-from path_util import AssertIsDirectory, AssertIsFile
+from path_util import AssertIsDirectory, AssertIsFile, 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
@@ -236,8 +236,7 @@ class CompiledFileSystem(object):
return self._file_system.Stat(path).version
def GetFileListingVersion(self, path):
- if not path.endswith('/'):
- path += '/'
+ path = ToDirectory(path)
cache_entry = self._list_object_store.Get(path).Get()
if cache_entry is not None:
return cache_entry.version
« no previous file with comments | « chrome/common/extensions/docs/server2/chained_compiled_file_system.py ('k') | chrome/common/extensions/docs/server2/cron.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698