fix: set `resources_dir` on FreeBSD
parent
8b0de9be4a
commit
b32b1e7188
|
|
@ -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" });
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue