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

Unified Diff: chrome/common/extensions/docs/server2/chained_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/chained_compiled_file_system.py
diff --git a/chrome/common/extensions/docs/server2/chained_compiled_file_system.py b/chrome/common/extensions/docs/server2/chained_compiled_file_system.py
index 6fbd31e73e0c5c7cf21faab2a16a80fd8e6db09e..74e2a59a3c73286b92c1580d0ac34e9c6512c78f 100644
--- a/chrome/common/extensions/docs/server2/chained_compiled_file_system.py
+++ b/chrome/common/extensions/docs/server2/chained_compiled_file_system.py
@@ -6,6 +6,7 @@ from compiled_file_system import CompiledFileSystem
from docs_server_utils import StringIdentity
from file_system import FileNotFoundError
from future import Future
+from path_util import ToDirectory
class ChainedCompiledFileSystem(object):
@@ -52,8 +53,7 @@ class ChainedCompiledFileSystem(object):
lambda compiled_fs: compiled_fs.GetFileVersion(path))
def GetFromFileListing(self, path):
- if not path.endswith('/'):
- path += '/'
+ path = ToDirectory(path)
return self._GetImpl(
path,
lambda compiled_fs: compiled_fs.GetFromFileListing(path),

Powered by Google App Engine
This is Rietveld 408576698