From 9dd4e7cb2018340886c045adc8d77bc2be17e82f Mon Sep 17 00:00:00 2001 From: Robert Günzler Date: Fri, 17 Oct 2025 22:51:16 +0200 Subject: move mtime manipulation into fs function MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Robert Günzler --- src/exe.zig | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'src/exe.zig') diff --git a/src/exe.zig b/src/exe.zig index ae5cfdd..63efd9a 100644 --- a/src/exe.zig +++ b/src/exe.zig @@ -77,13 +77,7 @@ fn pandocWorker(ctx: *Context, page: []const u8) !void { // fixup mtime of the resulting file, this has to happen after the file // swapper has been closed, because it works on a tmp file which is going // to be renamed (meaning mtime is changed again) - const fd = try std.fs.cwd().openFile(target_path, .{ .mode = .write_only }); - defer fd.close(); - - try std.posix.futimens( - fd.handle, - &[2]std.os.linux.timespec{ mtime, mtime }, - ); + try fs.setMtime(target_path, mtime); } pub fn captureStdout(ctx: *Context, argv: []const []const u8, env_map: ?*std.process.EnvMap, buf: std.io.AnyWriter) !void { -- cgit 1.4.1