diff options
| author | Xe Iaso <me@christine.website> | 2022-05-18 20:17:48 -0400 |
|---|---|---|
| committer | Xe Iaso <me@christine.website> | 2022-05-18 20:17:48 -0400 |
| commit | e2b9f384bf4033eddf321b5b5020ac4847609b37 (patch) | |
| tree | a7d0b57c91821d29fa1d34f80599d5eca7e517dd /src | |
| parent | 0e22f4c224401d10bc1097aeaf9ec4722d1f3e5e (diff) | |
| download | xesite-e2b9f384bf4033eddf321b5b5020ac4847609b37.tar.xz xesite-e2b9f384bf4033eddf321b5b5020ac4847609b37.zip | |
look for patreon creds in ~ instead of .
Signed-off-by: Xe Iaso <me@christine.website>
Diffstat (limited to 'src')
| -rw-r--r-- | src/app/mod.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/app/mod.rs b/src/app/mod.rs index fe87a88..1109b30 100644 --- a/src/app/mod.rs +++ b/src/app/mod.rs @@ -4,7 +4,7 @@ use chrono::prelude::*; use serde::Deserialize; use std::{ fs, - path::{Path, PathBuf}, + path::PathBuf, }; use tracing::{error, instrument}; @@ -22,7 +22,8 @@ pub struct Config { #[instrument] async fn patrons() -> Result<Option<patreon::Users>> { - let p = Path::new(".patreon.json"); + let mut p = dirs::home_dir().unwrap_or(".".into()); + p.push(".patreon.json"); if !p.exists() { info!("{:?} does not exist", p); return Ok(None); |
