We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents bfe1fcb + bf57c1e commit 1f25d01Copy full SHA for 1f25d01
compat/mingw.c
@@ -1273,8 +1273,13 @@ char *mingw_getcwd(char *pointer, int len)
1273
return NULL;
1274
ret = GetFinalPathNameByHandleW(hnd, wpointer, ARRAY_SIZE(wpointer), 0);
1275
CloseHandle(hnd);
1276
- if (!ret || ret >= ARRAY_SIZE(wpointer))
1277
- return NULL;
+ if (!ret || ret >= ARRAY_SIZE(wpointer)) {
+ ret = GetLongPathNameW(cwd, wpointer, ARRAY_SIZE(wpointer));
1278
1279
+ errno = ret ? ENAMETOOLONG : err_win_to_posix(GetLastError());
1280
+ return NULL;
1281
+ }
1282
1283
if (xwcstoutf(pointer, normalize_ntpath(wpointer), len) < 0)
1284
1285
return pointer;
0 commit comments