Skip to content

Commit

Permalink
Explicitly ensure that a cache entry doesn't already exist
Browse files Browse the repository at this point in the history
  • Loading branch information
NovaAndrom3da authored Dec 14, 2022
1 parent 2f266df commit 9db9085
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions phoenix/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,11 @@ def build(indexDirectories=False, config={}, cache={}, extensions={}):
"cont": index.read()
}
index.close()
elif not indexDirectories:
elif not '/' in cache.keys() and not indexDirectories:
# If indexDirectories is false, add a default index.html file to the cache
cache["/"] = {
"mime": "text/html",
"cont": "<!DOCTYPE html>\n<html><head></head><body></body></html>"
"cont": "<!DOCTYPE html>\n<html><head><!-- Default Phoenix Webpage --></head><body></body></html>"
}

for ext in extensions.keys():
Expand Down

0 comments on commit 9db9085

Please sign in to comment.