Skip to content

Commit

Permalink
book: Make book listings work on macos by using glib user_data_dir (#…
Browse files Browse the repository at this point in the history
…1866)

* book: Make listings work on macos by using glib user_data_dir

* book: Remove unused dirs dependency
  • Loading branch information
daxhuiberts authored Oct 17, 2024
1 parent 4fe608d commit 3f68339
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 54 deletions.
49 changes: 0 additions & 49 deletions book/listings/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion book/listings/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ adw = { version = "0.7", package = "libadwaita", features = ["v1_5"] }
anyhow = "1.0"
ashpd = { version = "0.9", features = ["gtk4"] }
async-channel = "2.0"
dirs = "5.0"
gtk = { version = "0.9", package = "gtk4", features = ["v4_12"] }
reqwest = { version = "0.12", default-features = false, features = [
"rustls-tls",
Expand Down
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 3f68339

Please sign in to comment.