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