diff options
author | 2023-03-06 08:45:27 +0200 | |
---|---|---|
committer | 2023-03-05 22:45:27 -0800 | |
commit | 993fed51c113d4a502f23ef5fc39f82f35144d05 (patch) | |
tree | cae29eb2a8099d1e4b2142d302bc6cbaee19d616 | |
parent | d4bd156d9d3bebbf447e84183d4b49dea0b531cd (diff) | |
download | bun-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.zig | 10 |
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)); |