From 741e1aedf6b4b4810b814a981cc7279ffa7f441a Mon Sep 17 00:00:00 2001 From: Mr Chen Date: Mon, 25 Nov 2024 00:56:59 +0800 Subject: [PATCH] Update mw.py --- web/core/mw.py | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/web/core/mw.py b/web/core/mw.py index 0a04a42b5..118eb7d46 100644 --- a/web/core/mw.py +++ b/web/core/mw.py @@ -106,11 +106,19 @@ def getPanelTaskLog(): return getMWLogs() + '/panel_task.log' def getWwwDir(): - file = getPanelDir() + '/data/site.pl' - if os.path.exists(file): - return readFile(file).strip() - return getFatherDir() + '/wwwroot' - + import thisdb + site_path = thisdb.getOption('site_path') + return site_path + +def getBackupDir(): + import thisdb + backup_path = thisdb.getOption('backup_path') + return backup_path + +def setBackupDir(bdir): + import thisdb + thisdb.setOption('backup_path', bdir) + return True def getPanelPort(): port_file = getPanelDir()+'/data/port.pl'