mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-04-18 05:20:29 +00:00
fix: set resources_dir on FreeBSD
This commit is contained in:
@@ -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" });
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user