mingw_fopen: report ENOENT for invalid file names
authorJohannes Sixt <j6t@kdbg.org>
Mon, 29 May 2017 20:27:35 +0000 (22:27 +0200)
committerJunio C Hamano <gitster@pobox.com>
Fri, 2 Jun 2017 01:40:04 +0000 (10:40 +0900)
On Windows, certain characters are prohibited in file names, most
prominently the colon. When fopen() is called with such an invalid file
name, the underlying Windows API actually reports a particular error,
but since there is no suitable errno value, this error is translated
to EINVAL. Detect the case and report ENOENT instead.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
No differences found