OSDN Git Service

* path.cc (normalize_win32_path): Don't add a trailing '\' if the cwd returns a
authorcgf <cgf>
Tue, 11 Nov 2008 03:51:55 +0000 (03:51 +0000)
committercgf <cgf>
Tue, 11 Nov 2008 03:51:55 +0000 (03:51 +0000)
path with a trailing '\'.

winsup/cygwin/ChangeLog
winsup/cygwin/path.cc

index 5e7870a..c8755b8 100644 (file)
@@ -1,3 +1,8 @@
+2008-11-10  Christopher Faylor  <me+cygwin@cgf.cx>
+
+       * path.cc (normalize_win32_path): Don't add a trailing '\' if the cwd
+       returns a path with a trailing '\'.
+
 2008-11-07  Christopher Faylor  <me+cygwin@cgf.cx>
 
        * pthread.cc (pthread_mutex::_unlock): Avoid unlocking a mutex if the
index 1f9028a..d0eab02 100644 (file)
@@ -1346,7 +1346,8 @@ normalize_win32_path (const char *src, char *dst, char *&tail)
       else
        {
          tail = strchr (tail, '\0');
-         *tail++ = '\\';
+         if (tail[-1] != '\\')
+           *tail++ = '\\';
        }
     }