windows path support.
This commit is contained in:
parent
00949b8783
commit
e145910234
@ -1091,6 +1091,17 @@ canoniseFileName(char *path)
|
|||||||
|
|
||||||
out = start = in;
|
out = start = in;
|
||||||
}
|
}
|
||||||
|
#ifdef __MINGW32__ /* /c/ in MINGW is the same as c: */
|
||||||
|
if ( in[0] == '/' && isLetter(in[1]) &&
|
||||||
|
in[2] == '/' )
|
||||||
|
{
|
||||||
|
out[0] = in[1];
|
||||||
|
out[1] = ':';
|
||||||
|
in += 3;
|
||||||
|
out = start = in;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
#ifdef O_HASSHARES /* //host/ */
|
#ifdef O_HASSHARES /* //host/ */
|
||||||
if ( in[0] == '/' && in[1] == '/' && isAlpha(in[2]) )
|
if ( in[0] == '/' && in[1] == '/' && isAlpha(in[2]) )
|
||||||
@ -1426,6 +1437,12 @@ IsAbsolutePath(const char *p) /* /d:/ */
|
|||||||
(p[3] == '/' || p[3] == '\0') )
|
(p[3] == '/' || p[3] == '\0') )
|
||||||
succeed;
|
succeed;
|
||||||
|
|
||||||
|
#ifdef __MINGW32__ /* /c/ in MINGW is the same as c: */
|
||||||
|
if ( p[0] == '/' && isLetter(p[1]) &&
|
||||||
|
(p[2] == '/' || p[2] == '\0') )
|
||||||
|
succeed;
|
||||||
|
#endif
|
||||||
|
|
||||||
if ( p[1] == ':' && isLetter(p[0]) && /* d:/ or d:\ */
|
if ( p[1] == ':' && isLetter(p[0]) && /* d:/ or d:\ */
|
||||||
(IS_DIR_SEPARATOR(p[2]) || p[2] == '\0') )
|
(IS_DIR_SEPARATOR(p[2]) || p[2] == '\0') )
|
||||||
succeed;
|
succeed;
|
||||||
|
Reference in New Issue
Block a user