]> xenbits.xensource.com Git - qemu-xen-4.4-testing.git/commitdiff
path_is_absolute() fix for win32
authorbellard <bellard>
Sun, 7 Jan 2007 18:22:37 +0000 (18:22 +0000)
committerbellard <bellard>
Sun, 7 Jan 2007 18:22:37 +0000 (18:22 +0000)
block.c

diff --git a/block.c b/block.c
index bbece2d24c014415eaec527da9c31320dd52f1c9..9264e42a6323ea4c7952b0e9b7aa103d8f4ce415 100644 (file)
--- a/block.c
+++ b/block.c
@@ -59,6 +59,11 @@ static BlockDriver *first_drv;
 int path_is_absolute(const char *path)
 {
     const char *p;
+#ifdef _WIN32
+    /* specific case for names like: "\\.\d:" */
+    if (*path == '/' || *path == '\\')
+        return 1;
+#endif
     p = strchr(path, ':');
     if (p)
         p++;