fix: 修复空配置启动失败问题 close #284

This commit is contained in:
涵曦 2024-12-03 09:02:15 +08:00
parent a19d53f000
commit 75ec336285

View File

@ -157,7 +157,7 @@ class XiaoMusic:
log_file = self.config.log_file
log_path = os.path.dirname(log_file)
if not os.path.exists(log_path):
if log_path and not os.path.exists(log_path):
os.makedirs(log_path)
if os.path.exists(log_file):
os.remove(log_file)