diff options
author | 2022-03-26 03:39:25 -0700 | |
---|---|---|
committer | 2022-03-26 03:39:25 -0700 | |
commit | 89af1474d8b4343cf0e17a39615d407d4c596d93 (patch) | |
tree | ebabf1a487d5a1d28f4c651401c2b687b033f5bb | |
parent | 690d22c8b646ac0dd44141f89d094af9e3bf6ff7 (diff) | |
download | bun-89af1474d8b4343cf0e17a39615d407d4c596d93.tar.gz bun-89af1474d8b4343cf0e17a39615d407d4c596d93.tar.zst bun-89af1474d8b4343cf0e17a39615d407d4c596d93.zip |
Fix clonefile() so it actually does run
-rw-r--r-- | src/javascript/jsc/webcore/response.zig | 5 |
1 files changed, 4 insertions, 1 deletions
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); |