Skip to content

Commit 4a5164b

Browse files
committed
fix: set resources_dir on FreeBSD
1 parent c6f1495 commit 4a5164b

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/os/resourcesdir.zig

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,16 @@ pub fn resourcesDir(alloc: std.mem.Allocator) !?[]const u8 {
5555
}
5656
}
5757

58-
// On all platforms, we look for a /usr/share style path. This
58+
// On all platforms (except BSD), we look for a /usr/share style path. This
5959
// is valid even on Mac since there is nothing that requires
6060
// Ghostty to be in an app bundle.
6161
inline for (sentinels) |sentinel| {
62-
if (try maybeDir(&dir_buf, dir, "share", sentinel)) |v| {
62+
if (try maybeDir(
63+
&dir_buf,
64+
dir,
65+
if (builtin.target.os.tag == .freebsd) "local/share" else "share",
66+
sentinel,
67+
)) |v| {
6368
return try std.fs.path.join(alloc, &.{ v, "ghostty" });
6469
}
6570
}

0 commit comments

Comments
 (0)