summaryrefslogtreecommitdiff
path: root/win32
diff options
context:
space:
mode:
Diffstat (limited to 'win32')
-rw-r--r--win32/win32.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/win32/win32.c b/win32/win32.c
index 6a7f6be9b8..966c326466 100644
--- a/win32/win32.c
+++ b/win32/win32.c
@@ -2734,7 +2734,7 @@ rb_w32_stat(const char *path, struct stat *st)
*end = '\0';
else if (*end != '\\')
strcat(buf1, "\\");
- } else if (*end == '\\' || *end == ':')
+ } else if (*end == '\\' || (buf1 + 1 == end && *end == ':'))
strcat(buf1, ".");
ret = stat(buf1, st);