summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--build.zig2
-rw-r--r--xdg.zig4
2 files changed, 3 insertions, 3 deletions
diff --git a/build.zig b/build.zig
index e02fa1e..b0ccd9d 100644
--- a/build.zig
+++ b/build.zig
@@ -1,3 +1,3 @@
1pub fn build(b: *@import("std").Build) void { 1pub 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}
diff --git a/xdg.zig b/xdg.zig
index a8f3aad..28d9059 100644
--- a/xdg.zig
+++ b/xdg.zig
@@ -67,13 +67,13 @@ pub fn getAllConfigDirs(allocator: Allocator, app_name: []const u8) ![][]u8 {
67} 67}
68 68
69pub fn openDataHome(allocator: Allocator, app_name: []const u8) !Dir { 69pub 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
75pub fn openBinHome(allocator: Allocator) !Dir { 75pub 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}