diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000000..61934b8002 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,4 @@ +# Auto normalizes line endings on commit so devs don't need to change local settings. +# Only effects text files and ignores other file types. +# For more info see: https://www.aleksandrhovhannisyan.com/blog/crlf-vs-lf-normalizing-line-endings-in-git/ +* text=auto diff --git a/ldm/dream/server.py b/ldm/dream/server.py index efe3139f74..bf73b5dca4 100644 --- a/ldm/dream/server.py +++ b/ldm/dream/server.py @@ -17,8 +17,8 @@ class DreamServer(BaseHTTPRequestHandler): self.wfile.write(content.read()) else: path = "." + self.path - cwd = os.getcwd() - is_in_cwd = os.path.commonprefix((os.path.realpath(path), cwd)) == cwd + cwd = os.getcwd().lower() + is_in_cwd = os.path.commonprefix((os.path.realpath(path).lower(), cwd)) == cwd if not (is_in_cwd and os.path.exists(path)): self.send_response(404) return diff --git a/static/dream_web/index.html b/static/dream_web/index.html index 34ee69bad2..4b49d49bc7 100644 --- a/static/dream_web/index.html +++ b/static/dream_web/index.html @@ -1,6 +1,7 @@ - + Stable Diffusion Dream Server + @@ -13,7 +14,7 @@
@@ -70,7 +71,7 @@