path update
This commit is contained in:
@@ -6,7 +6,11 @@ use std::path::PathBuf;
|
||||
lazy_static! {
|
||||
/// Base data directory for the application, using XDG standards.
|
||||
pub static ref DATA_DIR: PathBuf = {
|
||||
let mut path = dirs::data_dir().unwrap_or_else(|| PathBuf::from("."));
|
||||
let mut path = std::env::var("VIBE_INVEST_DATA_DIR")
|
||||
.map(PathBuf::from)
|
||||
.unwrap_or_else(|_| {
|
||||
dirs::data_dir().unwrap_or_else(|| PathBuf::from("."))
|
||||
});
|
||||
path.push("invest-bot");
|
||||
std::fs::create_dir_all(&path).expect("Failed to create data directory");
|
||||
path
|
||||
|
||||
Reference in New Issue
Block a user