summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--winsup/cygwin/ChangeLog5
-rw-r--r--winsup/cygwin/dcrt0.cc8
2 files changed, 12 insertions, 1 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index eeacb514a..abe54a630 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,8 @@
+Tue Apr 18 17:26:43 2000 Christopher Faylor <cgf@cygnus.com>
+
+ * dcrt0.cc (globify): Don't use \ quoting when apparently quoting a DOS
+ path spec.
+
Sun Apr 16 18:54:21 2000 Christopher Faylor <cgf@cygnus.com>
* init.cc (dll_entry): Use better check for determining when to set
diff --git a/winsup/cygwin/dcrt0.cc b/winsup/cygwin/dcrt0.cc
index 5fd9cd4b1..5f0ad4958 100644
--- a/winsup/cygwin/dcrt0.cc
+++ b/winsup/cygwin/dcrt0.cc
@@ -308,6 +308,8 @@ globify (char *word, char **&argv, int &argc, int &argvlen)
int n = 0;
char *p, *s;
int dos_spec = isalpha(*word) && word[1] == ':' ? 1 : 0;
+ if (!dos_spec && isquote(*word) && word[1] && word[2])
+ dos_spec = isalpha(word[1]) && word[2] == ':' ? 1 : 0;
/* We'll need more space if there are quoting characters in
word. If that is the case, doubling the size of the
@@ -330,7 +332,11 @@ globify (char *word, char **&argv, int &argc, int &argvlen)
char quote = *s;
while (*++s && *s != quote)
{
- if (*s == '\\' && s[1] == quote)
+ if (*s != '\\')
+ /* nothing */;
+ else if (dos_spec)
+ *p++ = '\\';
+ else if (s[1] == quote || s[1] == '\\')
s++;
*p++ = '\\';
*p++ = *s;