mirror of
https://github.com/kennethreitz/replit-py.git
synced 2026-06-05 15:00:20 +00:00
Fix file load bug
This commit is contained in:
@@ -62,8 +62,9 @@ class File(flask.Response):
|
||||
self.filename = str(filename)
|
||||
self.no_cache = no_cache
|
||||
|
||||
# load file
|
||||
if filename not in cache:
|
||||
if filename in cache:
|
||||
self.content = cache[filename]
|
||||
else:
|
||||
with open(filename, "r") as f:
|
||||
self.content = f.read()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user