Minor fix
convert path to str
This commit is contained in:
parent
164238b8b5
commit
ab7707c429
1 changed files with 2 additions and 2 deletions
|
@ -413,8 +413,8 @@ class SiteStorage(object):
|
||||||
if path == self.directory:
|
if path == self.directory:
|
||||||
inner_path = ""
|
inner_path = ""
|
||||||
else:
|
else:
|
||||||
if str(path).startswith(self.directory):
|
if str(path).startswith(str(self.directory)):
|
||||||
inner_path = path[len(self.directory) + 1:]
|
inner_path = path[len(str(self.directory)) + 1:]
|
||||||
else:
|
else:
|
||||||
raise Exception("File not allowed: %s" % path)
|
raise Exception("File not allowed: %s" % path)
|
||||||
return inner_path
|
return inner_path
|
||||||
|
|
Loading…
Reference in a new issue