Faster getPath
This commit is contained in:
parent
97b3563e6b
commit
f506ac9701
1 changed files with 4 additions and 1 deletions
|
@ -317,7 +317,10 @@ class SiteStorage(object):
|
||||||
if path == self.directory:
|
if path == self.directory:
|
||||||
inner_path = ""
|
inner_path = ""
|
||||||
else:
|
else:
|
||||||
inner_path = re.sub("^%s/" % re.escape(self.directory), "", path)
|
if path.startswith(self.directory):
|
||||||
|
inner_path = path[len(self.directory)+1:]
|
||||||
|
else:
|
||||||
|
raise Exception(u"File not allowed: %s" % path)
|
||||||
return inner_path
|
return inner_path
|
||||||
|
|
||||||
# Verify all files sha512sum using content.json
|
# Verify all files sha512sum using content.json
|
||||||
|
|
Loading…
Reference in a new issue