aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Alex Lam S.L <alexlamsl@gmail.com> 2023-03-06 08:45:27 +0200
committerGravatar GitHub <noreply@github.com> 2023-03-05 22:45:27 -0800
commit993fed51c113d4a502f23ef5fc39f82f35144d05 (patch)
treecae29eb2a8099d1e4b2142d302bc6cbaee19d616
parentd4bd156d9d3bebbf447e84183d4b49dea0b531cd (diff)
downloadbun-993fed51c113d4a502f23ef5fc39f82f35144d05.tar.gz
bun-993fed51c113d4a502f23ef5fc39f82f35144d05.tar.zst
bun-993fed51c113d4a502f23ef5fc39f82f35144d05.zip
fix missing `Blob` error messages on Linux (#2315)
-rw-r--r--src/bun.js/webcore/blob.zig10
1 files 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));