On Sat, Oct 10, 2020 at 01:31:21PM +0200, Juan José Santamaría Flecha wrote:
> Thanks for taking care of this. I see no problems in the build farm, but
> please reach me if I missed something.

Thanks for continuing your work on this patch.  I see no related
failures in the buildfarm.

-               _dosmaperr(GetLastError());
+               DWORD           err = GetLastError();
+
+               /* report when not ERROR_SUCCESS */
+               if (err == ERROR_FILE_NOT_FOUND || err == ERROR_PATH_NOT_FOUND)
+                       errno = ENOENT;
+               else
+                       _dosmaperr(err);
Why are you changing that?  The original coding is fine, as
_dosmaperr() already maps ERROR_FILE_NOT_FOUND and
ERROR_PATH_NOT_FOUND to ENOENT.

-      _dosmaperr(GetLastError());
+      DWORD           err = GetLastError();
+
       CloseHandle(hFile);
+      _dosmaperr(err);
These parts are indeed incorrect.  CloseHandle() could overwrite
errno.
--
Michael

Attachment: signature.asc
Description: PGP signature

Reply via email to