fix(windows): unify config/data dir and add service log file
config_dir() on Windows now returns data_dir() (ProgramData) so config, services.json, and log file are in the same place for both interactive and service contexts. Service mode writes logs to numa.log via env_logger pipe. Dashboard shows correct log path per OS.
This commit is contained in:
@@ -101,14 +101,11 @@ where
|
||||
/// Linux root daemon: /var/lib/numa (FHS) — falls back to /usr/local/var/numa
|
||||
/// if a pre-v0.10.1 install already lives there.
|
||||
/// macOS root daemon: /usr/local/var/numa (Homebrew prefix)
|
||||
/// Windows: %APPDATA%\numa
|
||||
/// Windows: %PROGRAMDATA%\numa (same as data_dir — no per-user config on Windows)
|
||||
pub fn config_dir() -> std::path::PathBuf {
|
||||
#[cfg(windows)]
|
||||
{
|
||||
std::path::PathBuf::from(
|
||||
std::env::var("APPDATA").unwrap_or_else(|_| "C:\\ProgramData".into()),
|
||||
)
|
||||
.join("numa")
|
||||
data_dir()
|
||||
}
|
||||
#[cfg(not(windows))]
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user