Fix path-to-str

This commit is contained in:
caryoscelus 2024-05-10 19:23:05 +00:00
parent 597bd57bd2
commit fd13b132af
No known key found for this signature in database
GPG key ID: 254EDDB85B66CB1F

View file

@ -413,7 +413,7 @@ class SiteStorage(object):
if path == self.directory:
inner_path = ""
else:
if path.startswith(self.directory):
if str(path).startswith(self.directory):
inner_path = path[len(self.directory) + 1:]
else:
raise Exception("File not allowed: %s" % path)