summaryrefslogtreecommitdiff
path: root/src/kmk/kmkbuiltin/install.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/kmk/kmkbuiltin/install.c')
-rw-r--r--src/kmk/kmkbuiltin/install.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/kmk/kmkbuiltin/install.c b/src/kmk/kmkbuiltin/install.c
index 799effe..13bec72 100644
--- a/src/kmk/kmkbuiltin/install.c
+++ b/src/kmk/kmkbuiltin/install.c
@@ -1021,7 +1021,13 @@ install_dir(char *path)
int ch;
for (p = path;; ++p)
- if (!*p || (p != path && IS_SLASH(*p))) {
+ if ( !*p
+ || ( p != path
+ && IS_SLASH(*p)
+#if defined(_MSC_VER) /* stat("C:") fails (VC++ v10). Just skip it since it's unnecessary. */
+ && (p - path != 2 || p[-1] != ':')
+#endif
+ )) {
ch = *p;
*p = '\0';
if (stat(path, &sb)) {