summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
author-k <slowdive@me.com>2025-06-19 17:54:22 -0400
committerMitchell Hashimoto <m@mitchellh.com>2025-06-21 14:11:50 -0700
commitb32b1e718804c866204e4ba88c31275d72bf8f97 (patch)
treeb6419445cdc8db6e33525c7992e95aed438bc69e /src
parent8b0de9be4a09bf8fe6f6a1483592892fdc96af48 (diff)
fix: set `resources_dir` on FreeBSD
Diffstat (limited to 'src')
-rw-r--r--src/os/resourcesdir.zig9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/os/resourcesdir.zig b/src/os/resourcesdir.zig
index 803116e62..0ef92d3b3 100644
--- a/src/os/resourcesdir.zig
+++ b/src/os/resourcesdir.zig
@@ -55,11 +55,16 @@ pub fn resourcesDir(alloc: std.mem.Allocator) !?[]const u8 {
}
}
- // On all platforms, we look for a /usr/share style path. This
+ // On all platforms (except BSD), we look for a /usr/share style path. This
// is valid even on Mac since there is nothing that requires
// Ghostty to be in an app bundle.
inline for (sentinels) |sentinel| {
- if (try maybeDir(&dir_buf, dir, "share", sentinel)) |v| {
+ if (try maybeDir(
+ &dir_buf,
+ dir,
+ if (builtin.target.os.tag == .freebsd) "local/share" else "share",
+ sentinel,
+ )) |v| {
return try std.fs.path.join(alloc, &.{ v, "ghostty" });
}
}