diff options
Diffstat (limited to '')
| -rw-r--r-- | build.zig | 5 | ||||
| -rw-r--r-- | xdg.zig | 2 |
2 files changed, 2 insertions, 5 deletions
| @@ -1,6 +1,3 @@ | |||
| 1 | pub fn build(b: *@import("std").Build) void { | 1 | pub 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 | } |
| @@ -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 | } |