path_is_absolute() fix for win32
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2307 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
3b39528c15
commit
21664424ed
5
block.c
5
block.c
|
@ -59,6 +59,11 @@ static BlockDriver *first_drv;
|
||||||
int path_is_absolute(const char *path)
|
int path_is_absolute(const char *path)
|
||||||
{
|
{
|
||||||
const char *p;
|
const char *p;
|
||||||
|
#ifdef _WIN32
|
||||||
|
/* specific case for names like: "\\.\d:" */
|
||||||
|
if (*path == '/' || *path == '\\')
|
||||||
|
return 1;
|
||||||
|
#endif
|
||||||
p = strchr(path, ':');
|
p = strchr(path, ':');
|
||||||
if (p)
|
if (p)
|
||||||
p++;
|
p++;
|
||||||
|
|
Loading…
Reference in New Issue