diff options
| author | -k <slowdive@me.com> | 2025-06-19 17:54:22 -0400 |
|---|---|---|
| committer | Mitchell Hashimoto <m@mitchellh.com> | 2025-06-21 14:11:50 -0700 |
| commit | b32b1e718804c866204e4ba88c31275d72bf8f97 (patch) | |
| tree | b6419445cdc8db6e33525c7992e95aed438bc69e /src/os | |
| parent | 8b0de9be4a09bf8fe6f6a1483592892fdc96af48 (diff) | |
fix: set `resources_dir` on FreeBSD
Diffstat (limited to 'src/os')
| -rw-r--r-- | src/os/resourcesdir.zig | 9 |
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" }); } } |
