--config CLI Param fix

This commit is contained in:
2026-05-06 03:24:56 +01:00
parent c812091ce3
commit 0d1b362217
4 changed files with 26 additions and 9 deletions

View File

@@ -204,6 +204,22 @@ def get_config_path():
return CONFIG_FOLDER_NAME
_dashboard_config_path_override = None
def set_dashboard_config_path_override(path):
"""Sets a global override for the dashboard config file path (used by --config CLI arg)."""
global _dashboard_config_path_override
_dashboard_config_path_override = path
def get_dashboard_config_path(config_file_name):
"""Returns the dashboard config file path, respecting any --config CLI override."""
if _dashboard_config_path_override:
return _dashboard_config_path_override
return os.path.join(get_config_path(), config_file_name)
def get_old_filename(current_filename, old_suffix="_old"):
"""Generate old backup filename from current filename.