Skip to content

Commit

Permalink
Remove the redundant check and directly use dir()
Browse files Browse the repository at this point in the history
  • Loading branch information
liby committed Jan 2, 2025
1 parent 6058d38 commit a605c74
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions src/os/xdg.zig
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,6 @@ pub fn config(alloc: Allocator, opts: Options) ![]u8 {

/// Get the XDG cache directory. The returned value is allocated.
pub fn cache(alloc: Allocator, opts: Options) ![]u8 {
if (posix.getenv("XDG_CACHE_HOME")) |env| {
return try std.fs.path.join(alloc, &[_][]const u8{
env,
opts.subdir orelse "",
});
}

return try dir(alloc, opts, .{
.env = "XDG_CACHE_HOME",
.windows_env = "LOCALAPPDATA",
Expand Down

0 comments on commit a605c74

Please sign in to comment.