diff options
Diffstat (limited to 'src/data')
| -rw-r--r-- | src/data/ipaddress_history.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/data/ipaddress_history.rs b/src/data/ipaddress_history.rs index 3d2bb5b..2787c36 100644 --- a/src/data/ipaddress_history.rs +++ b/src/data/ipaddress_history.rs @@ -1,4 +1,4 @@ -use just_enough_vcs::vcs::current::current_doc_dir; +use just_enough_vcs::vcs::current::current_cfg_dir; const IP_HISTORY_NAME: &str = "ip_history.txt"; @@ -7,7 +7,7 @@ pub struct IpAddressHistory { } pub async fn get_recent_ip_address() -> Vec<String> { - if let Some(local) = current_doc_dir() { + if let Some(local) = current_cfg_dir() { let path = local.join(IP_HISTORY_NAME); match tokio::fs::read_to_string(path).await { Ok(content) => content.lines().map(String::from).collect(), @@ -20,7 +20,7 @@ pub async fn get_recent_ip_address() -> Vec<String> { pub async fn insert_recent_ip_address(ip: impl Into<String>) { let ip = ip.into(); - if let Some(local) = current_doc_dir() { + if let Some(local) = current_cfg_dir() { let path = local.join(IP_HISTORY_NAME); let mut recent_ips = get_recent_ip_address().await; recent_ips.retain(|existing_ip| existing_ip != &ip); |
