Add content.json location to getFileInfo
This commit is contained in:
parent
2ef537ee6c
commit
5dbaf02e33
1 changed files with 7 additions and 2 deletions
|
@ -330,8 +330,13 @@ class ContentManager(object):
|
|||
# Return the rules if user dir
|
||||
if content and "user_contents" in content:
|
||||
back = content["user_contents"]
|
||||
# Content.json is in the users dir
|
||||
back["content_inner_path"] = re.sub("(.*)/.*?$", "\\1/content.json", inner_path)
|
||||
content_inner_path_dir = helper.getDirname(content_inner_path)
|
||||
relative_content_path = inner_path[len(content_inner_path_dir):]
|
||||
if "/" in relative_content_path:
|
||||
user_auth_address = re.match("([A-Za-z0-9]+)/.*", relative_content_path).group(1)
|
||||
back["content_inner_path"] = "%s%s/content.json" % (content_inner_path_dir, user_auth_address)
|
||||
else:
|
||||
back["content_inner_path"] = content_inner_path_dir + "content.json"
|
||||
back["optional"] = None
|
||||
return back
|
||||
|
||||
|
|
Loading…
Reference in a new issue