From e5b313442ab7c700d0851e9dbe7d2b029e3893e5 Mon Sep 17 00:00:00 2001 From: Johannes Sixt Date: Mon, 29 May 2017 22:27:35 +0200 Subject: mingw_fopen: report ENOENT for invalid file names 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 Signed-off-by: Junio C Hamano --- t/t5580-clone-push-unc.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 't') diff --git a/t/t5580-clone-push-unc.sh b/t/t5580-clone-push-unc.sh index 944730cddc..b322c2f722 100755 --- a/t/t5580-clone-push-unc.sh +++ b/t/t5580-clone-push-unc.sh @@ -45,7 +45,7 @@ test_expect_success push ' test "$rev" = "$(git rev-parse --verify refs/heads/to-push)" ' -test_expect_failure 'remote nick cannot contain backslashes' ' +test_expect_success 'remote nick cannot contain backslashes' ' BACKSLASHED="$(pwd | tr / \\\\)" && git ls-remote "$BACKSLASHED" >out 2>err && test_i18ngrep ! "unable to access" err -- cgit v1.2.3