mirror of
https://github.com/ruby/ruby.git
synced 2026-10-28 16:36:20 +08:00
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:
1 parent
52f025a28e
commit
46728e6cff
1 file changed
+4
Notes:
git
2026-07-23 05:57:06 +00:00
@@ -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++ = '/';
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user