diff options
author | Chris Robinson <[email protected]> | 2015-10-14 05:01:34 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2015-10-14 05:01:34 -0700 |
commit | 3c54ba3901d93093406a7e5129bb43badcc6cf50 (patch) | |
tree | 510f418358389a8e23fa7cabe72d2d0554f315a2 | |
parent | f654767395cbc28568095ea76622bd932f9beca9 (diff) |
Fix absolute path detection on Windows
-rw-r--r-- | Alc/helpers.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Alc/helpers.c b/Alc/helpers.c index c789a426..710fa8e6 100644 --- a/Alc/helpers.c +++ b/Alc/helpers.c @@ -771,11 +771,13 @@ vector_al_string SearchDataFiles(const char *match, const char *subdir) } /* If the path is absolute, use it directly. */ - if(wmatch[0] != '\0' && wmatch[1] == ':' && is_slash(wmatch[2])) + if(isalpha(wmatch[0]) && wmatch[1] == ':' && is_slash(wmatch[2])) { - CHAR drv[3] = { wmatch[0], ':', 0 }; + char drv[3] = { (char)wmatch[0], ':', 0 }; RecurseDirectorySearch(drv, wmatch+3, &results); } + else if(wmatch[0] == '\\' && wmatch[1] == '\\' && wmatch[2] == '?' && wmatch[3] == '\\') + RecurseDirectorySearch("\\\\?", wmatch+4, &results); else { al_string path = AL_STRING_INIT_STATIC(); |