summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Uko Kokņevičs2024-07-10 10:36:48 +0300
committerGravatar Uko Kokņevičs2024-07-10 10:37:11 +0300
commit7a1fe22046e374461c37fb232dca0a1a1733a532 (patch)
tree4059384936d404792db2cdfd7469dec971daf91f
parentUpdate for zig 0.13.0 (diff)
downloadzig-xdg-7a1fe22046e374461c37fb232dca0a1a1733a532.tar.gz
zig-xdg-7a1fe22046e374461c37fb232dca0a1a1733a532.tar.xz
zig-xdg-7a1fe22046e374461c37fb232dca0a1a1733a532.zip
Update zigHEAD0.5.0main
-rw-r--r--build.zig5
-rw-r--r--xdg.zig2
2 files changed, 2 insertions, 5 deletions
diff --git a/build.zig b/build.zig
index dfc9dce..13692f9 100644
--- a/build.zig
+++ b/build.zig
@@ -1,6 +1,3 @@
1pub fn build(b: *@import("std").Build) void { 1pub fn build(b: *@import("std").Build) void {
2 _ = b.addModule("xdg", .{ .root_source_file = .{ .src_path = .{ 2 _ = b.addModule("xdg", .{ .root_source_file = b.path("xdg.zig") });
3 .owner = b,
4 .sub_path = "xdg.zig",
5 } } });
6} 3}
diff --git a/xdg.zig b/xdg.zig
index c56ce38..c7d7e23 100644
--- a/xdg.zig
+++ b/xdg.zig
@@ -42,7 +42,7 @@ pub fn getConfigDirs(allocator: Allocator, app_name: []const u8) ![][]u8 {
42 defer list.deinit(); 42 defer list.deinit();
43 43
44 if (std.posix.getenv("XDG_CONFIG_DIRS")) |config_dirs| { 44 if (std.posix.getenv("XDG_CONFIG_DIRS")) |config_dirs| {
45 var it = std.mem.split(u8, config_dirs, ":"); 45 var it = std.mem.splitScalar(u8, config_dirs, ':');
46 while (it.next()) |config_dir| { 46 while (it.next()) |config_dir| {
47 try list.append(try std.fs.path.join(allocator, &.{ config_dir, app_name })); 47 try list.append(try std.fs.path.join(allocator, &.{ config_dir, app_name }));
48 } 48 }