diff options
author | Christopher Faylor <me@cgf.cx> | 2000-12-03 05:16:33 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2000-12-03 05:16:33 +0000 |
commit | 6c057e82df0c5cc7291e7e81b679f7dcaccb131a (patch) | |
tree | 460c0645b2c3fcf4431025c94bf99b31e988f9f6 /winsup/cygwin/path.cc | |
parent | 6b6a8cefad468dc1dfc92da06ccb45363e346736 (diff) | |
download | cygnal-6c057e82df0c5cc7291e7e81b679f7dcaccb131a.tar.gz cygnal-6c057e82df0c5cc7291e7e81b679f7dcaccb131a.tar.bz2 cygnal-6c057e82df0c5cc7291e7e81b679f7dcaccb131a.zip |
* Makefile.in: Use CXX to build the DLL.
* configure.in: Find correct c++ compiler.
* configure: Regenerate.
* path.cc (normalize_posix_path): Put correct drive at beginning of \foo style
paths.
(chdir): Don't send non-posix path to cygcwd.set.
Diffstat (limited to 'winsup/cygwin/path.cc')
-rw-r--r-- | winsup/cygwin/path.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc index 060bb9a4e..8e392d772 100644 --- a/winsup/cygwin/path.cc +++ b/winsup/cygwin/path.cc @@ -713,11 +713,13 @@ normalize_win32_path (const char *src, char *dst) char *dst_start = dst; char *dst_root_start = dst; - if (!SLASH_P (src[0]) && strchr (src, ':') == NULL) + if (strchr (src, ':') == NULL) { if (!cygcwd.get (dst, 0)) return get_errno (); - if (strlen (dst) + 1 + strlen (src) >= MAX_PATH) + if (SLASH_P (src[0])) + dst[2] = '\0'; + else if (strlen (dst) + 1 + strlen (src) >= MAX_PATH) { debug_printf ("ENAMETOOLONG = normalize_win32_path (%s)", src); return ENAMETOOLONG; @@ -2557,7 +2559,7 @@ chdir (const char *dir) if (res == -1) __seterrno (); else - cygcwd.set (path, dir); + cygcwd.set (path, strpbrk (dir, ":\\") != NULL ? NULL : dir); /* Note that we're accessing cwd.posix without a lock here. I didn't think it was worth locking just for strace. */ |