blob: 4b212b99cfd80cdd417373ea8cb698979e119811 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
//! Shared data directory for Fluorine Manager.
//!
//! All data lives under `~/.local/share/fluorine/` — accessible from both
//! native and Flatpak builds (the Flatpak has `--filesystem=home`).
use std::path::PathBuf;
/// Returns the Fluorine data directory (`~/.local/share/fluorine`).
pub fn data_dir() -> PathBuf {
let home = std::env::var("HOME").unwrap_or_else(|_| "/tmp".to_string());
PathBuf::from(home).join(".local/share/fluorine")
}
|