Debian Codegraph @

debian/patches/xdg-2-compat.patch

raw
1 Description: Patch for rust-xdg 2 compat
2 Author: Simon Quigley <[email protected]>
3 Origin: vendor
4 Forwarded: not-needed
5 Last-Update: 2026-06-20
6 ---
7 This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
8 --- a/src/main.rs
9 +++ b/src/main.rs
10 @@ -478,9 +478,11 @@ fn main() -> Result<(), Box<dyn Error>>
11 #[cfg(all(not(windows), not(target_arch = "wasm32")))]
12 fn get_default_config_path() -> String {
13 let xdg_dirs = xdg::BaseDirectories::with_prefix("comrak");
14 - if let Ok(path) = xdg_dirs.place_config_file("config") {
15 - if let Some(path_str) = path.to_str() {
16 - return path_str.into();
17 + if let Ok(xdg_dirs) = xdg::BaseDirectories::new() {
18 + if let Ok(path) = xdg_dirs.place_config_file("config") {
19 + if let Some(path_str) = path.to_str() {
20 + return path_str.into();
21 + }
22 }
23 }
24