Re: [PATCH 01/18] mingw: don't call `GetFileAttributes()` twice in `mingw_lstat()`
- From
Johannes Sixt <j6t@kdbg.org>
- Date
- Dec 18, 2025, 10:34 UTC
- Message-ID
- <44db571b-4fb1-43da-a7c2-eb7cc15048ab@kdbg.org>
- In-Reply-To
- <dae450dd0e995b26d0140cf3753d103f5470f44d.1765980535.git.gitgitgadget@gmail.com>
Am 17.12.25 um 15:08 schrieb Karsten Blees via GitGitGadget:
Show 8 quoted lines
> From: Karsten Blees <blees@dcon.de> > > The Win32 API function `GetFileAttributes()` cannot handle paths with > trailing dir separators. The current `mingw_stat()`/`mingw_lstat()` > implementation calls `GetFileAttributes()` twice if the path has > trailing slashes (first with the original path that was passed as > function parameter, and and a second time with a path copy with trailing > '/' removed).
A comment above do_lstat() mentions this procedure. This patch doesn't change the comment, but it should.
-- Hannes