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:
parent
424c3fb43d
commit
22198c30b1
1 changed files with 10 additions and 7 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue