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:
|
||||
inner_path = ""
|
||||
else:
|
||||
if str(path).startswith(self.directory):
|
||||
inner_path = path[len(self.directory) + 1:]
|
||||
if str(path).startswith(str(self.directory)):
|
||||
inner_path = path[len(str(self.directory)) + 1:]
|
||||
else:
|
||||
raise Exception("File not allowed: %s" % path)
|
||||
return inner_path
|
||||
|
|
Loading…
Reference in a new issue