From 993fed51c113d4a502f23ef5fc39f82f35144d05 Mon Sep 17 00:00:00 2001 From: "Alex Lam S.L" Date: Mon, 6 Mar 2023 08:45:27 +0200 Subject: fix missing `Blob` error messages on Linux (#2315) --- src/bun.js/webcore/blob.zig | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/bun.js/webcore/blob.zig b/src/bun.js/webcore/blob.zig index ae60ef01f..c610b199d 100644 --- a/src/bun.js/webcore/blob.zig +++ b/src/bun.js/webcore/blob.zig @@ -1188,11 +1188,11 @@ pub const Blob = struct { else this.file_blob.store.?.data.file.pathlike.path; - this.system_error = .{ - .syscall = ZigString.init("open"), - .code = ZigString.init(bun.asByteSlice(@errorName(this.errno.?))), - .path = ZigString.init(path_string.slice()), - }; + this.system_error = (JSC.Node.Syscall.Error{ + .errno = @intCast(JSC.Node.Syscall.Error.Int, -completion.result), + .path = path_string.slice(), + .syscall = .open, + }).toSystemError(); // assert we never end up reusing the memory std.debug.assert(@ptrToInt(this.system_error.?.path.slice().ptr) != @ptrToInt(path_buffer)); -- cgit v1.2.3