mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-07-29 20:07:55 +00:00
implement sentry transport to write crash reports to XDG_STATE_HOME
This commit is contained in:
@@ -37,6 +37,15 @@ pub fn cache(alloc: Allocator, opts: Options) ![]u8 {
|
||||
});
|
||||
}
|
||||
|
||||
/// Get the XDG state directory. The returned value is allocated.
|
||||
pub fn state(alloc: Allocator, opts: Options) ![]u8 {
|
||||
return try dir(alloc, opts, .{
|
||||
.env = "XDG_STATE_HOME",
|
||||
.windows_env = "LOCALAPPDATA",
|
||||
.default_subdir = ".local/state",
|
||||
});
|
||||
}
|
||||
|
||||
const InternalOptions = struct {
|
||||
env: []const u8,
|
||||
windows_env: []const u8,
|
||||
|
||||
Reference in New Issue
Block a user