GetDbFiles return inner path

This commit is contained in:
shortcutme 2017-02-09 01:57:12 +01:00
parent f3c71f3e6c
commit 56efa02820
No known key found for this signature in database
GPG key ID: 5B63BAE6CB9613AE
2 changed files with 6 additions and 6 deletions

View file

@ -228,8 +228,8 @@ class SiteStoragePlugin(object):
for content_inner_path, content in merged_site.content_manager.contents.iteritems():
# content.json file itself
if merged_site.storage.isFile(content_inner_path): # Missing content.json file
content_path = self.getPath("merged-%s/%s/%s" % (merged_type, merged_site.address, content_inner_path))
yield content_path, merged_site.storage.open(content_inner_path)
merged_inner_path = "merged-%s/%s/%s" % (merged_type, merged_site.address, content_inner_path)
yield merged_inner_path, merged_site.storage.open(content_inner_path)
else:
merged_site.log.error("[MISSING] %s" % content_inner_path)
# Data files in content.json
@ -240,8 +240,8 @@ class SiteStoragePlugin(object):
file_inner_path = content_inner_path_dir + file_relative_path # File Relative to site dir
file_inner_path = file_inner_path.strip("/") # Strip leading /
if merged_site.storage.isFile(file_inner_path):
file_path = self.getPath("merged-%s/%s/%s" % (merged_type, merged_site.address, file_inner_path))
yield file_path, merged_site.storage.open(file_inner_path)
merged_inner_path = "merged-%s/%s/%s" % (merged_type, merged_site.address, file_inner_path)
yield merged_inner_path, merged_site.storage.open(file_inner_path)
else:
merged_site.log.error("[MISSING] %s" % file_inner_path)

View file

@ -78,7 +78,7 @@ class SiteStorage(object):
for content_inner_path, content in self.site.content_manager.contents.iteritems():
# content.json file itself
if self.isFile(content_inner_path): # Missing content.json file
yield self.getPath(content_inner_path), self.open(content_inner_path)
yield content_inner_path, self.open(content_inner_path)
else:
self.log.error("[MISSING] %s" % content_inner_path)
# Data files in content.json
@ -89,7 +89,7 @@ class SiteStorage(object):
file_inner_path = content_inner_path_dir + file_relative_path # File Relative to site dir
file_inner_path = file_inner_path.strip("/") # Strip leading /
if self.isFile(file_inner_path):
yield self.getPath(file_inner_path), self.open(file_inner_path)
yield file_inner_path, self.open(file_inner_path)
else:
self.log.error("[MISSING] %s" % file_inner_path)