Fixed data.json path
This commit is contained in:
parent
c7f166e807
commit
a2e27b2c47
1 changed files with 4 additions and 0 deletions
|
@ -6,6 +6,10 @@ pub fn main() !void {
|
|||
defer _ = gpa.deinit();
|
||||
const allocator = gpa.allocator();
|
||||
|
||||
const username = std.os.getenv("USER");
|
||||
|
||||
const path = try std.fmt.allocPrint(allocator, "/home/{s}/.config/lister/data.json", .{username});
|
||||
|
||||
const file = try std.fs.cwd().openFile("~/.config/lister/data.json", .{});
|
||||
defer file.close();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue