Skip to content

Commit

Permalink
book: Make listings work on macos by using glib user_data_dir
Browse files Browse the repository at this point in the history
  • Loading branch information
daxhuiberts committed Oct 17, 2024
1 parent 4fe608d commit 8775196
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions book/listings/xtask/main.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use std::env;
use std::path::PathBuf;

use anyhow::Context;
use walkdir::WalkDir;
use xshell::{cmd, Shell};

Expand Down Expand Up @@ -53,9 +52,7 @@ fn schema_dir() -> anyhow::Result<PathBuf> {
let schema_dir = if cfg!(windows) {
PathBuf::from("C:/ProgramData/glib-2.0/schemas/")
} else {
dirs::data_dir()
.context("Could not get data dir")?
.join("glib-2.0/schemas")
gtk::glib::user_data_dir().join("glib-2.0/schemas")
};
Ok(schema_dir)
}
Expand Down

0 comments on commit 8775196

Please sign in to comment.