diff options
author | Christopher Faylor <me@cgf.cx> | 2004-12-20 17:55:22 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2004-12-20 17:55:22 +0000 |
commit | e0520ec4b76e5bc4bce9c8a6f3399033a79adc38 (patch) | |
tree | 052d8c3e024b03a0b7bcd6ec112c6660cf4bbaf8 /winsup/cygwin/path.cc | |
parent | 8d060512a60424a15628acb3bb3a7ede760396f5 (diff) | |
download | cygnal-e0520ec4b76e5bc4bce9c8a6f3399033a79adc38.tar.gz cygnal-e0520ec4b76e5bc4bce9c8a6f3399033a79adc38.tar.bz2 cygnal-e0520ec4b76e5bc4bce9c8a6f3399033a79adc38.zip |
* path.cc (normalize_win32_path): Remove unneeded check for dots.
Diffstat (limited to 'winsup/cygwin/path.cc')
-rw-r--r-- | winsup/cygwin/path.cc | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc index f1c25c4c8..87f3c7a02 100644 --- a/winsup/cygwin/path.cc +++ b/winsup/cygwin/path.cc @@ -1010,7 +1010,9 @@ normalize_win32_path (const char *src, char *dst, char *&tail) /* dst must be greater than dst_start */ && tail[-1] == '\\') { - if (isdirsep (src[2]) || src[2] == 0) + if (!isdirsep (src[2]) && src[2] != '\0') + *tail++ = *src++; + else { /* Back up over /, but not if it's the first one. */ if (tail > dst + 1) @@ -1022,13 +1024,6 @@ normalize_win32_path (const char *src, char *dst, char *&tail) if (isdirsep (*src)) src++; } - else - { - int n = strspn (src, "."); - if (!src[n] || isdirsep (src[n])) /* just dots... */ - return ENOENT; - *tail++ = *src++; - } } /* Otherwise, add char to result. */ else |