fix: cfg fix for Linux

changed cfg!(linux) to cfg!(target_os = "linux")
This commit is contained in:
Twan Stok
2024-05-07 19:55:22 +02:00
committed by GitHub
parent 73c75448c4
commit 2db47e3d39

View File

@@ -103,7 +103,7 @@ pub fn user_runtime_directory() -> Option<PathBuf> {
if let Some(xdg_runtime_directory) = xdg_runtime_directory() {
Some(xdg_runtime_directory.join("ncspot"))
} else if cfg!(linux) && linux_runtime_directory.exists() {
} else if cfg!(target_os = "linux") && linux_runtime_directory.exists() {
Some(linux_runtime_directory.join("ncspot"))
} else if unix_runtime_directory.exists() {
Some(unix_runtime_directory.join(format!("ncspot-{}", unsafe { libc::getuid() })))