diff options
author | Christopher Faylor <me@cgf.cx> | 2000-04-18 21:28:45 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2000-04-18 21:28:45 +0000 |
commit | c845acffda0062fbde9c2aed8d278e913ca7c008 (patch) | |
tree | 77de68a8cb74eee9788bc8f3e06c2116f2a88274 | |
parent | e11ddfb02d7fcd85e263a0d1e96bcd5b0d4d788d (diff) | |
download | cygnal-c845acffda0062fbde9c2aed8d278e913ca7c008.tar.gz cygnal-c845acffda0062fbde9c2aed8d278e913ca7c008.tar.bz2 cygnal-c845acffda0062fbde9c2aed8d278e913ca7c008.zip |
* dcrt0.cc (globify): Don't use \ quoting when apparently quoting a DOS path
spec.
-rw-r--r-- | winsup/cygwin/ChangeLog | 5 | ||||
-rw-r--r-- | winsup/cygwin/dcrt0.cc | 8 |
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; |