clean up warnings

This commit is contained in:
John Smith 2024-01-20 22:06:15 -05:00
parent 2ef91116ee
commit a092463f77

View File

@ -794,18 +794,20 @@ impl Settings {
/// `/Users/<user>/Library/Application Support/org.Veilid.Veilid`
///
pub fn get_default_config_path() -> PathBuf {
let default_path = PathBuf::from("/etc/veilid-server/veilid-server.conf");
#[cfg(unix)]
{
let default_path = PathBuf::from("/etc/veilid-server/veilid-server.conf");
if default_path.exists() {
return default_path;
}
}
ProjectDirs::from("org", "Veilid", "Veilid")
.map(|dirs| dirs.config_dir().join("veilid-server.conf"))
.unwrap_or_else(|| PathBuf::from("./veilid-server.conf"))
}
#[allow(dead_code)]
fn get_or_create_private_directory<P: AsRef<Path>>(path: P, group_read: bool) -> bool {
let path = path.as_ref();
if !path.is_dir()
@ -817,6 +819,7 @@ impl Settings {
true
}
#[allow(dead_code)]
fn get_or_create_default_directory(subpath: &str) -> PathBuf {
#[cfg(unix)]
{