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

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

Issue 166073007: Fixed clean URLs for GCS file system provider in the documentation server. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/docs/server2/gcs_file_system.py
diff --git a/chrome/common/extensions/docs/server2/gcs_file_system.py b/chrome/common/extensions/docs/server2/gcs_file_system.py
index 909377ad8046785115e1302104ea07f769397b43..355728f6e290e9c3f0fb3db5af5ea4f015135805 100644
--- a/chrome/common/extensions/docs/server2/gcs_file_system.py
+++ b/chrome/common/extensions/docs/server2/gcs_file_system.py
@@ -39,8 +39,8 @@ def _ReadFile(filename):
def _ListDir(dir_name):
AssertIsDirectory(dir_name)
try:
- files = cloudstorage_api.listbucket('/' + dir_name)
- return [os_path.filename.lstrip('/') for os_path in files]
+ files = cloudstorage_api.listbucket('/' + dir_name, delimiter='/')
+ return [os_path.filename.lstrip('/')[len(dir_name):] for os_path in files]
except errors.Error:
raise FileNotFoundError('cloudstorage.listbucket failed for %s: %s' %
(dir_name, traceback.format_exc()))
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698