Skip to content

Commit cf96e47

Browse files
dschoGit for Windows Build Agent
authored and
Git for Windows Build Agent
committed
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 b5dcd8a + 0dd1cc4 commit cf96e47

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
@@ -949,7 +949,7 @@ ssize_t mingw_write(int fd, const void *buf, size_t len)
949949
{
950950
ssize_t result = write(fd, buf, len);
951951

952-
if (result < 0 && errno == EINVAL && buf) {
952+
if (result < 0 && (errno == EINVAL || errno == EBADF) && buf) {
953953
/* check if fd is a pipe */
954954
HANDLE h = (HANDLE) _get_osfhandle(fd);
955955
if (GetFileType(h) == FILE_TYPE_PIPE)

0 commit comments

Comments
 (0)