1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* win32/win32.c (isUNCRoot): multibyte character support.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1274 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
eban 2001-03-21 15:18:05 +00:00
parent 424c3fb43d
commit 22198c30b1

View file

@ -2668,13 +2668,16 @@ isUNCRoot(const char *path)
{ {
if (path[0] == '\\' && path[1] == '\\') { if (path[0] == '\\' && path[1] == '\\') {
const char *p; const char *p;
if (p = strchr(path + 3, '\\')) { for (p = path + 3; *p; p = CharNext(p)) {
if (!p[1]) if (*p == '\\')
return 0; break;
if (p = strchr(p + 1, '\\')) { }
if (!p[1]) if (p[0] && p[1]) {
return 1; for (p++; *p; p = CharNext(p)) {
} else if (*p == '\\')
break;
}
if (!p[0] || !p[1])
return 1; return 1;
} }
} }