From 6fca26972bbe4407f6d0c4c76f13efa8eeda212c Mon Sep 17 00:00:00 2001 From: Bryan Lee <38807139+liby@users.noreply.github.com> Date: Fri, 3 Jan 2025 00:21:44 +0800 Subject: [PATCH] Remove the redundant check and directly use `dir()` --- src/os/xdg.zig | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/os/xdg.zig b/src/os/xdg.zig index 80645dcb5..a5b29abe4 100644 --- a/src/os/xdg.zig +++ b/src/os/xdg.zig @@ -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",