On Friday 2025-04-25 08:22, Florian Westphal wrote:

>Sunny73Cr <sunny7...@protonmail.com> wrote:
>> error: invalid path 'src/json.'
>
>There is indeed a bogus file of that name, no idea
>why its there or why cygwin git chokes on it.

There is some prior record -
https://github.com/libgit2/libgit2/issues/6968

"foo" and "foo." are equivalent in DOS, and there is a normalization
phase from "foo." to "foo". This carried forward into contemporary
Windows cmd.exe, explorer.exe (File Explorer), the usual file access
APIs.

        echo abc >x
        echo def >y.

creates "y" not "y." in cmd.

But Cygwin does something unusual, it *actually* creates a file with
the 2-char sequence "y.", through whatever means. Explorer *shows* it
with the dot, but practially no application other than Cygwin can
open it, because all normal APIs and fs lookup mechanisms are
rummaging for "y" as per the earlier equivalance, and either

1. there is no file "y", so some programs can/may/will throw an error
2. or, come to think of it, there is an evil file (hi oss-security)

  [in cgwin]
  echo good >y
  echo evil >y.

If you now try to open "y." with notepad.exe from Explorer, you always 
get the "good" variant. Only inside Cygwin, e.g. with cat.exe, can "y" 
be distinguished from "y.".

Reply via email to