Skip to content

Commit 43f7efb

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 9fffddc + 430a65a commit 43f7efb

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

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

0 commit comments

Comments
 (0)