diff --git a/src/decoders/trx-decode-log/src/lib.rs b/src/decoders/trx-decode-log/src/lib.rs index 8c9a627..0f14d29 100644 --- a/src/decoders/trx-decode-log/src/lib.rs +++ b/src/decoders/trx-decode-log/src/lib.rs @@ -25,14 +25,14 @@ use trx_core::decode::{AprsPacket, CwEvent, Ft8Message, WefaxMessage, WsprMessag // --------------------------------------------------------------------------- fn default_decode_logs_dir() -> String { - if let Some(data_dir) = dirs::data_dir() { - return data_dir + if let Some(cache_dir) = dirs::cache_dir() { + return cache_dir .join("trx-rs") .join("decoders") .to_string_lossy() .to_string(); } - "logs/decoders".to_string() + ".cache/trx-rs/decoders".to_string() } /// Server-side decoder file logging configuration. diff --git a/src/trx-client/trx-frontend/trx-frontend-http/src/recorder.rs b/src/trx-client/trx-frontend/trx-frontend-http/src/recorder.rs index 1f6ac4f..fd88d9f 100644 --- a/src/trx-client/trx-frontend/trx-frontend-http/src/recorder.rs +++ b/src/trx-client/trx-frontend/trx-frontend-http/src/recorder.rs @@ -28,7 +28,7 @@ use tracing::{error, info, warn}; pub struct RecorderConfig { /// Whether the recorder feature is available. pub enabled: bool, - /// Directory for recorded files. Default: `$XDG_DATA_HOME/trx-rs/recordings/`. + /// Directory for recorded files. Default: `$XDG_CACHE_HOME/trx-rs/recordings/`. pub output_dir: Option, /// Maximum duration of a single recording in seconds. None = unlimited. pub max_duration_secs: Option, @@ -49,8 +49,8 @@ impl RecorderConfig { if let Some(ref dir) = self.output_dir { PathBuf::from(dir) } else { - dirs::data_dir() - .unwrap_or_else(|| PathBuf::from(".")) + dirs::cache_dir() + .unwrap_or_else(|| PathBuf::from(".cache")) .join("trx-rs") .join("recordings") }