From: Johannes Sixt Date: Thu, 18 Dec 2025 10:34:57 GMT Subject: Re: [PATCH 01/18] mingw: don't call `GetFileAttributes()` twice in `mingw_lstat()` Message-ID: <44db571b-4fb1-43da-a7c2-eb7cc15048ab@kdbg.org> In-Reply-To: Am 17.12.25 um 15:08 schrieb Karsten Blees via GitGitGadget: > From: Karsten Blees > > 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