summaryrefslogtreecommitdiff
path: root/compat/winansi.c
diff options
context:
space:
mode:
authorLibravatar Johannes Sixt <j6t@kdbg.org>2014-11-16 22:06:26 +0100
committerLibravatar Junio C Hamano <gitster@pobox.com>2014-11-17 08:45:50 -0800
commitba6fad02b6cbbfbf5acf3303b4d8ddfd8624fdb2 (patch)
treea60a2929fd97c96f05f7122df9667a7a727a81d1 /compat/winansi.c
parentMerge branch 'nd/gitignore-trailing-whitespace' into maint (diff)
downloadtgif-ba6fad02b6cbbfbf5acf3303b4d8ddfd8624fdb2.tar.xz
Windows: correct detection of EISDIR in mingw_open()
According to the Linux open(2) man page, open() must return EISDIR if a directory was attempted to be opened for writing. Our emulation in mingw_open() does not get this right: it checks only for O_CREAT. Fix it to check for a write request. This fixes a failure in reflog handling, which opens files with O_APPEND|O_WRONLY, but without O_CREAT, and expects EISDIR when the named file happens to be a directory. Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'compat/winansi.c')
0 files changed, 0 insertions, 0 deletions