mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Johannes Schindelin via GitGitGadget" <>
Cc: Johannes Schindelin <>,
	Nathan Sanders <>
Subject: [PATCH] mingw: cope with the Isilon network file system
Date: Thu, 09 Apr 2020 10:24:13 +0000	[thread overview]
Message-ID: <> (raw)

From: Nathan Sanders <>

On certain network filesystems (currently encounterd with Isilon, but in
theory more network storage solutions could be causing the same issue),
when the directory in question is missing, `raceproof_create_file()`
fails with an `ERROR_INVALID_PARAMETER` instead of an

Since it is highly unlikely that we produce such an error by mistake
(the parameters we pass are fairly benign), we can be relatively certain
that the directory is missing in this instance. So let's just translate
that error automagically.

This fixes

Signed-off-by: Nathan Sanders <>
Signed-off-by: Johannes Schindelin <>
    mingw: cope with the Isilon network file system
    Yet another patch that has lived in Git for Windows for a while. In
    contrast to the other patches I submitted today, it is younger than a
    year, but not by much: its author date is Independence Day 2019.

Fetch-It-Via: git fetch pr-git-756/dscho/work-around-isilon-v1

 compat/mingw.c | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/compat/mingw.c b/compat/mingw.c
index d14065d60ec..201e99292fd 100644
--- a/compat/mingw.c
+++ b/compat/mingw.c
@@ -460,8 +460,19 @@ static int mingw_open_append(wchar_t const *wfilename, int oflags, ...)
 	handle = CreateFileW(wfilename, FILE_APPEND_DATA,
-	if (handle == INVALID_HANDLE_VALUE)
-		return errno = err_win_to_posix(GetLastError()), -1;
+	if (handle == INVALID_HANDLE_VALUE) {
+		DWORD err = GetLastError();
+		/*
+		 * Some network storage solutions (e.g. Isilon) might return
+		 * ERROR_INVALID_PARAMETER instead of expected error
+		 * ERROR_PATH_NOT_FOUND, which results in a unknow error. If
+		 * so, the error is now forced to be an ERROR_PATH_NOT_FOUND
+		 * error instead.
+		 */
+		return errno = err_win_to_posix(err), -1;
+	}
 	 * No O_APPEND here, because the CRT uses it only to reset the

base-commit: 9fadedd637b312089337d73c3ed8447e9f0aa775

             reply	other threads:[~2020-04-09 10:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-09 10:24 Johannes Schindelin via GitGitGadget [this message]
2020-04-09 10:57 ` [PATCH] mingw: cope with the Isilon network file system Martin Ågren
2020-04-09 12:02   ` Johannes Schindelin
2020-04-10 11:28 ` [PATCH v2] " Johannes Schindelin via GitGitGadget
2020-04-10 20:21   ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

  List information:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).