From c6e443f10f4467bf2892e86defdec13c25a51cff Mon Sep 17 00:00:00 2001 From: Ron Yorston Date: Fri, 8 Mar 2024 09:25:45 +0000 Subject: win32: let realpath(3) work on flaky filesystems Some filesystems don't support the feature required to resolve symlinks for realpath(3). In such cases just carry on without resolving symlinks. This is a trade-off between correctness and convenience. Adds 16 bytes. (GitHub issue #389) --- win32/mingw.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/win32/mingw.c b/win32/mingw.c index 093e795ac..eef3ab5d3 100644 --- a/win32/mingw.c +++ b/win32/mingw.c @@ -1561,6 +1561,9 @@ static char *resolve_symlinks(char *path) if (status != 0 && status < MAX_PATH) { ptr = normalize_ntpathA(path); goto end; + } else if (err_win_to_posix() == ENOSYS) { + ptr = xstrdup(path); + goto end; } } -- cgit v1.2.3-55-g6feb