dln_find: Treat backslash as a separator when joining on DOSISH

When a search path component ends with a backslash, only '/' was
recognized as a trailing separator, so an extra '/' was inserted and
the resulting path contained a doubled separator.
This commit is contained in:
Hiroshi SHIBATA committed 2026-07-23 14:56:34 +09:00
1 parent 52f025a28e
commit 46728e6cff
1 file changed
+4
Notes: git 2026-07-23 05:57:06 +00:00
+4
View File
@@ -234,7 +234,11 @@ dln_find_1(const char *fname, const char *path, char *fbuf, size_t size,
}
/* add a "/" between directory and filename */
#if defined(DOSISH)
if (ep[-1] != '/' && ep[-1] != '\\')
#else
if (ep[-1] != '/')
#endif
*bp++ = '/';
}