diff --git a/agent-node/agent_node/config.py b/agent-node/agent_node/config.py index ad9eeba..de9e64f 100644 --- a/agent-node/agent_node/config.py +++ b/agent-node/agent_node/config.py @@ -48,3 +48,9 @@ CERT_CLIENT_CRT = os.getenv("CERT_CLIENT_CRT", "certs/client.crt") CERT_CLIENT_KEY = os.getenv("CERT_CLIENT_KEY", "certs/client.key") +# FS Explorer root - Priority: Env > YAML > HOME > / +FS_ROOT = os.getenv("CORTEX_FS_ROOT", _config.get("fs_root")) +if not FS_ROOT: + # Default to user home on unix systems to avoid showing root directory by default + FS_ROOT = os.path.expanduser("~") if platform.system() in ["Darwin", "Linux"] else "C:\\" +