We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f5bddaa commit 23d45c0Copy full SHA for 23d45c0
server.py
@@ -354,7 +354,7 @@ def purgeOld(self):
354
def load(self):
355
with self.lock:
356
try:
357
- with open(os.path.join("static", "list.json"), "r") as fd:
+ with open(os.path.join(app.static_folder, "list.json"), "r") as fd:
358
data = json.load(fd)
359
except FileNotFoundError:
360
return
@@ -376,7 +376,7 @@ def save(self):
376
self.maxServers = max(servers, self.maxServers)
377
self.maxClients = max(clients, self.maxClients)
378
379
- list_path = os.path.join(app.root_path, app.static_folder, "list.json")
+ list_path = os.path.join(app.static_folder, "list.json")
380
with open(list_path + "~", "w") as fd:
381
json.dump({
382
"total": {"servers": servers, "clients": clients},
0 commit comments