Skip to content

Commit 16f68c8

Browse files
dschoGit for Windows Build Agent
authored andcommitted
Additional error checks for issuing the windows.appendAtomically warning (#4528)
Another (hopefully clean) PR for showing the error warning about atomic append on windows after failure on APFS, which returns EBADF not EINVAL. Signed-off-by: David Lomas <[email protected]>
2 parents edfb9e0 + 9245463 commit 16f68c8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compat/mingw.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -719,7 +719,7 @@ ssize_t mingw_write(int fd, const void *buf, size_t len)
719719
{
720720
ssize_t result = write(fd, buf, len);
721721

722-
if (result < 0 && errno == EINVAL && buf) {
722+
if (result < 0 && (errno == EINVAL || errno == EBADF) && buf) {
723723
/* check if fd is a pipe */
724724
HANDLE h = (HANDLE) _get_osfhandle(fd);
725725
if (GetFileType(h) == FILE_TYPE_PIPE)

0 commit comments

Comments
 (0)