aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2024-03-08 09:25:45 +0000
committerRon Yorston <rmy@pobox.com>2024-03-08 09:25:45 +0000
commitc6e443f10f4467bf2892e86defdec13c25a51cff (patch)
tree61d2b4b21ea8d0b54e1aec9f8ce6150012547009
parenta9f74eb95d4c0da15b93d943ccdf872a642ea368 (diff)
downloadbusybox-w32-c6e443f10f4467bf2892e86defdec13c25a51cff.tar.gz
busybox-w32-c6e443f10f4467bf2892e86defdec13c25a51cff.tar.bz2
busybox-w32-c6e443f10f4467bf2892e86defdec13c25a51cff.zip
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)
-rw-r--r--win32/mingw.c3
1 files changed, 3 insertions, 0 deletions
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)
1561 if (status != 0 && status < MAX_PATH) { 1561 if (status != 0 && status < MAX_PATH) {
1562 ptr = normalize_ntpathA(path); 1562 ptr = normalize_ntpathA(path);
1563 goto end; 1563 goto end;
1564 } else if (err_win_to_posix() == ENOSYS) {
1565 ptr = xstrdup(path);
1566 goto end;
1564 } 1567 }
1565 } 1568 }
1566 1569