Update dashboard.py

- Fixed `WGDashboard_Backup` not being created and caused crash
This commit is contained in:
Donald Zou 2024-12-31 10:33:28 +08:00
parent 85be6d53d0
commit 409e6d49b2

View File

@ -479,6 +479,9 @@ class WireguardConfiguration:
self.__parseConfigurationFile()
self.__initPeersList()
if not os.path.exists(os.path.join(DashboardConfig.GetConfig("Server", "wg_conf_path")[1], 'WGDashboard_Backup')):
os.mkdir(os.path.join(DashboardConfig.GetConfig("Server", "wg_conf_path")[1], 'WGDashboard_Backup'))
else:
self.Name = data["ConfigurationName"]