summaryrefslogtreecommitdiff
path: root/win32/win32.c
diff options
context:
space:
mode:
Diffstat (limited to 'win32/win32.c')
-rw-r--r--win32/win32.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/win32/win32.c b/win32/win32.c
index 9e6e6a3..61872e9 100644
--- a/win32/win32.c
+++ b/win32/win32.c
@@ -1485,7 +1485,6 @@ static NtCmdLineElement **
cmdglob(NtCmdLineElement *patt, NtCmdLineElement **tail, UINT cp)
{
char buffer[MAXPATHLEN], *buf = buffer;
- char *p;
NtCmdLineElement **last = tail;
int status;
@@ -1494,9 +1493,7 @@ cmdglob(NtCmdLineElement *patt, NtCmdLineElement **tail, UINT cp)
strlcpy(buf, patt->str, patt->len + 1);
buf[patt->len] = '\0';
- for (p = buf; *p; p = CharNextExA(cp, p, 0))
- if (*p == '\\')
- *p = '/';
+ translate_char(buf, '\\', '/', cp);
status = ruby_brace_glob(buf, 0, insert, (VALUE)&tail);
if (buf != buffer)
free(buf);