Minor fix

convert path to str
This commit is contained in:
caryoscelus 2024-06-15 13:55:09 +00:00
parent 164238b8b5
commit ab7707c429
No known key found for this signature in database
GPG key ID: 254EDDB85B66CB1F

View file

@ -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