From e2ee551e3b67afbd504e208b4389c55b6e9f4f57 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Thu, 29 Jul 1999 11:01:50 +0000 Subject: [PATCH] (getdefdir): Don't return failure indication when _fixpath sets errno to ENOSYS. --- src/msdos.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/msdos.c b/src/msdos.c index 24edf9c59dc..d43ce1ac798 100644 --- a/src/msdos.c +++ b/src/msdos.c @@ -2831,7 +2831,9 @@ getdefdir (drive, dst) *p = '\0'; errno = 0; _fixpath (in_path, dst); - if (errno) + /* _fixpath can set errno to ENOSYS on non-LFN systems because + it queries the LFN support, so ignore that error. */ + if ((errno && errno != ENOSYS) || *dst == '\0') return 0; msdos_downcase_filename (dst); -- 2.39.5