mirror of
https://github.com/git/git
synced 2024-10-06 00:29:28 +00:00
Merge branch 'js/access-nul-emulation-on-windows'
Portability fix. * js/access-nul-emulation-on-windows: msvc: avoid calling `access("NUL", flags)`
This commit is contained in:
commit
4090b6973b
|
@ -685,6 +685,8 @@ ssize_t mingw_write(int fd, const void *buf, size_t len)
|
|||
int mingw_access(const char *filename, int mode)
|
||||
{
|
||||
wchar_t wfilename[MAX_PATH];
|
||||
if (!strcmp("nul", filename) || !strcmp("/dev/null", filename))
|
||||
return 0;
|
||||
if (xutftowcs_path(wfilename, filename) < 0)
|
||||
return -1;
|
||||
/* X_OK is not supported by the MSVCRT version */
|
||||
|
|
Loading…
Reference in a new issue