Skip to content

Commit

Permalink
fix isFIFO (#3715)
Browse files Browse the repository at this point in the history
* check poll ref flags

* Update WebCoreJSBuiltins.cpp
  • Loading branch information
dylan-conway committed Jul 21, 2023
1 parent cd49615 commit 21bb3b2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/bun.js/webcore/streams.zig
Expand Up @@ -4579,12 +4579,12 @@ pub fn NewReadyWatcher(
return this.is_fifo;
}

if (this.poll_ref != null) {
return true;
if (this.poll_ref) |_poll_ref| {
return _poll_ref.flags.contains(.fifo);
}

if (comptime @hasField(Context, "mode")) {
return std.os.S.ISFIFO(this.mode) or std.os.S.ISCHR(this.mode);
return std.os.S.ISFIFO(this.mode);
}

return false;
Expand Down
4 changes: 2 additions & 2 deletions src/js/out/WebCoreJSBuiltins.cpp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 21bb3b2

Please sign in to comment.