From 36af036233c31c6685af65da451dc6a3becbd923 Mon Sep 17 00:00:00 2001 From: skylar taylor-barrick Date: Mon, 12 Oct 2026 17:10:30 +0200 Subject: [PATCH] PRINT: scope XDG absolute-path regression to Unix --- apps/wordcraft/src/default_apps.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/wordcraft/src/default_apps.rs b/apps/wordcraft/src/default_apps.rs index 8f07b2170..263fc73ae 100644 --- a/apps/wordcraft/src/default_apps.rs +++ b/apps/wordcraft/src/default_apps.rs @@ -61,7 +61,7 @@ fn xdg_mime_args(desktop_id: &str) -> Vec { /// The `applications` folders the desktop looks for entries in, from `XDG_DATA_HOME` (default /// `~/.local/share`) and `XDG_DATA_DIRS` (default `/usr/local/share:/usr/share`). Relative paths /// are ignored, as the XDG Base Directory spec says. -#[cfg(any(all(unix, not(target_os = "macos")), test))] +#[cfg(all(unix, any(not(target_os = "macos"), test)))] fn application_dirs(data_home: Option<&str>, data_dirs: Option<&str>, home: Option<&str>) -> Vec { use std::path::{Path, PathBuf}; let absolute = |s: &&str| Path::new(s).is_absolute(); @@ -130,6 +130,7 @@ mod xdg { #[cfg(test)] mod tests { + #[cfg(unix)] use std::path::PathBuf; use super::*; @@ -163,6 +164,7 @@ mod tests { assert!(entry.lines().any(|l| l == "Exec=wordcraft %F"), "files are passed on the command line"); } + #[cfg(unix)] #[test] fn application_dirs_follow_the_xdg_spec() { let p = |s: &str| PathBuf::from(s);