Added fix for OS2 paths.
Reported on mailing list by Andrey Vasilkin
This commit is contained in:
parent
c8587cea86
commit
4f1462b73b
@ -476,15 +476,29 @@ BOOL PathMakePathA(LPCSTR path, LPSECURITY_ATTRIBUTES lpAttributes)
|
|||||||
char* dup;
|
char* dup;
|
||||||
char* p;
|
char* p;
|
||||||
BOOL result = TRUE;
|
BOOL result = TRUE;
|
||||||
|
|
||||||
/* we only operate on a non-null, absolute path */
|
/* we only operate on a non-null, absolute path */
|
||||||
|
#if defined(__OS2__)
|
||||||
|
|
||||||
|
if (!path)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
if (!path || *path != delim)
|
if (!path || *path != delim)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
if (!(dup = _strdup(path)))
|
if (!(dup = _strdup(path)))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
#ifdef __OS2__
|
||||||
|
p = (strlen(dup) > 3) && (dup[1] == ':') && (dup[2] == delim)) ? &dup[3] : dup;
|
||||||
|
|
||||||
|
while (p)
|
||||||
|
#else
|
||||||
for (p = dup; p;)
|
for (p = dup; p;)
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
if ((p = strchr(p + 1, delim)))
|
if ((p = strchr(p + 1, delim)))
|
||||||
* p = '\0';
|
* p = '\0';
|
||||||
|
Loading…
Reference in New Issue
Block a user