git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2] lstat(mingw): correctly detect ENOTDIR scenarios

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 28, 2022, 17:37 UTC
Message-ID
<xmqq8rodcf5i.fsf@gitster.g>
In-Reply-To
<pull.1291.v2.git.1659018558989.gitgitgadget@gmail.com>

"Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com> writes:

> In that code, the return value of `GetFileAttributesW()` is interpreted
> as an enum value, not as a bit field, so that a perfectly fine leading
> directory can be misdetected as "not a directory".

Nicely analyzed. So after all ENOTDIR was a buggy response and by fixing it we help all callers of lstat(), as pointed out in the earlier review.

>      * Thanks to Eric's excellent review, the reporter and I dug deeper and
>        figured out the real bug (and fix).
Yeah, thanks all.
Will queue.
Previous: Johannes Schindelin via GitGitGadgetNext: Eric Sunshine
Message 7 of 9 in “refs: work around network caching on Windows”
  1. refs: work around network caching on WindowsJohannes Schindelin via GitGitGadget, Jul 15, 2022
  2. Eric SunshineJul 15, 2022
  3. Johannes SchindelinJul 15, 2022
  4. Junio C HamanoJul 15, 2022
  5. Ævar Arnfjörð BjarmasonJul 15, 2022
  6. lstat(mingw): correctly detect ENOTDIR scenariosJohannes Schindelin via GitGitGadget, Jul 28, 2022
  7. Junio C HamanoJul 28, 2022
  8. Eric SunshineJul 28, 2022
  9. lstat(mingw): correctly detect ENOTDIR scenariosJohannes Schindelin via GitGitGadget, Jul 29, 2022

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.