Project

General

Profile

Bug #12230 ยป win32-seek-espipe.patch

jeremyevans0 (Jeremy Evans), 07/24/2019 06:43 PM

View differences:

io.c
pos = NUM2OFFT(offset);
GetOpenFile(io, fptr);
pos = io_seek(fptr, pos, whence);
if (pos < 0 && errno) rb_sys_fail_path(fptr->pathv);
if (pos < 0 && errno) {
#ifdef _WIN32
if (errno == EINVAL &&
(RTEST(rb_funcall(rb_cFile, rb_intern("pipe?"), 1, io)) ||
RTEST(rb_funcall(rb_cFile, rb_intern("socket?"), 1, io))))
errno = ESPIPE;
#endif
rb_sys_fail_path(fptr->pathv);
}
return INT2FIX(0);
}
    (1-1/1)