From 89af1474d8b4343cf0e17a39615d407d4c596d93 Mon Sep 17 00:00:00 2001 From: Jarred Sumner Date: Sat, 26 Mar 2022 03:39:25 -0700 Subject: Fix clonefile() so it actually does run --- src/javascript/jsc/webcore/response.zig | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/javascript/jsc/webcore/response.zig b/src/javascript/jsc/webcore/response.zig index 3936adbcd..050d26c5b 100644 --- a/src/javascript/jsc/webcore/response.zig +++ b/src/javascript/jsc/webcore/response.zig @@ -2927,7 +2927,10 @@ pub const Blob = struct { } pub fn doClonefile(this: *CopyFile) anyerror!void { - switch (JSC.Node.Syscall.clonefile(this.destination_file_store.pathlike.path.sliceZAssume(), this.source_file_store.pathlike.path.sliceZAssume())) { + var source_buf: [bun.MAX_PATH_BYTES]u8 = undefined; + var dest_buf: [bun.MAX_PATH_BYTES]u8 = undefined; + + switch (JSC.Node.Syscall.clonefile(this.source_file_store.pathlike.path.sliceZ(&source_buf), this.destination_file_store.pathlike.path.sliceZ(&dest_buf))) { .err => |errno| { this.system_error = errno.toSystemError(); return AsyncIO.asError(errno.errno); -- cgit v1.2.3