diff options
| -rw-r--r-- | build.zig | 2 | ||||
| -rw-r--r-- | xdg.zig | 4 |
2 files changed, 3 insertions, 3 deletions
| @@ -1,3 +1,3 @@ | |||
| 1 | pub fn build(b: *@import("std").Build) void { | 1 | pub fn build(b: *@import("std").Build) void { |
| 2 | _ = b.addModule("xdg", .{ .source_file = .{ .path = "xdg.zig" } }); | 2 | _ = b.addModule("xdg", .{ .root_source_file = .{ .path = "xdg.zig" } }); |
| 3 | } | 3 | } |
| @@ -67,13 +67,13 @@ pub fn getAllConfigDirs(allocator: Allocator, app_name: []const u8) ![][]u8 { | |||
| 67 | } | 67 | } |
| 68 | 68 | ||
| 69 | pub fn openDataHome(allocator: Allocator, app_name: []const u8) !Dir { | 69 | pub fn openDataHome(allocator: Allocator, app_name: []const u8) !Dir { |
| 70 | var data_home = try getDataHome(allocator, app_name); | 70 | const data_home = try getDataHome(allocator, app_name); |
| 71 | defer allocator.free(data_home); | 71 | defer allocator.free(data_home); |
| 72 | return try std.fs.cwd().makeOpenPath(data_home, .{}); | 72 | return try std.fs.cwd().makeOpenPath(data_home, .{}); |
| 73 | } | 73 | } |
| 74 | 74 | ||
| 75 | pub fn openBinHome(allocator: Allocator) !Dir { | 75 | pub fn openBinHome(allocator: Allocator) !Dir { |
| 76 | var bin_home = try getBinHome(allocator); | 76 | const bin_home = try getBinHome(allocator); |
| 77 | defer allocator.free(bin_home); | 77 | defer allocator.free(bin_home); |
| 78 | return try std.fs.cwd().makeOpenPath(bin_home, .{}); | 78 | return try std.fs.cwd().makeOpenPath(bin_home, .{}); |
| 79 | } | 79 | } |