Fix image location on webpage - windows (#568)

This commit is contained in:
William Becher 2022-09-15 08:40:27 -03:00 committed by GitHub
parent df4d1162b5
commit 30e69f8b32
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -107,7 +107,7 @@ class DreamServer(BaseHTTPRequestHandler):
out_dir = os.path.realpath(self.outdir.rstrip('/'))
if self.path.startswith('/static/dream_web/'):
path = '.' + self.path
elif out_dir.endswith(path_dir):
elif out_dir.replace('\\', '/').endswith(path_dir):
file = os.path.basename(self.path)
path = os.path.join(self.outdir,file)
else: