diff --git a/src/clipboard.zig b/src/clipboard.zig index 52e05da..bcbeb07 100644 --- a/src/clipboard.zig +++ b/src/clipboard.zig @@ -80,7 +80,9 @@ pub fn clipboardChanged(self: *Self, contents: []const u8) !void { fn getKey(allocator: std.mem.Allocator) !*[crypt.key_size]u8 { const passfile = std.fs.cwd().openFile(".clippy", .{}) catch |e| { if (e == error.FileNotFound) { - std.log.err("Could not find '.clippy' file. Please add a password to this file", .{}); + const cwd = std.fs.realpathAlloc(allocator, ".") catch "could not determine"; + defer allocator.free(cwd); + std.log.err("Could not find '.clippy' file in directory {s}. Please add a password to this file", .{cwd}); } return e; };