diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2003-01-10 20:25:47 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2003-01-10 20:25:47 +0000 |
commit | df2caa88ca470c5acb41244fcf6e51fd4dae45c8 (patch) | |
tree | d6c80c177709ec973da91146f89958c7024ad849 | |
parent | dc8d11f52e5eda900c9b7dc06aab19567b1c9a50 (diff) | |
download | newlib-df2caa88ca470c5acb41244fcf6e51fd4dae45c8.zip newlib-df2caa88ca470c5acb41244fcf6e51fd4dae45c8.tar.gz newlib-df2caa88ca470c5acb41244fcf6e51fd4dae45c8.tar.bz2 |
* path.cc: Revert patch from 2003-01-09 to normalize a windows path
rather than converting to posix.
-rw-r--r-- | winsup/cygwin/ChangeLog | 5 | ||||
-rw-r--r-- | winsup/cygwin/path.cc | 10 |
2 files changed, 11 insertions, 4 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 01338e1..2404a08 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,5 +1,10 @@ 2003-01-10 Corinna Vinschen <corinna@vinschen.de> + * path.cc: Revert patch from 2003-01-09 to normalize a windows path + rather than converting to posix. + +2003-01-10 Corinna Vinschen <corinna@vinschen.de> + * autoload.cc (gethostname): Make call optional, return 1 if function can't get loaded. * net.cc (cygwin_gethostname): Call GetComputerName if return value diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc index f88b03d..61d446b 100644 --- a/winsup/cygwin/path.cc +++ b/winsup/cygwin/path.cc @@ -205,7 +205,10 @@ normalize_posix_path (const char *src, char *dst) syscall_printf ("src %s", src); if (isdrive (src) || strpbrk (src, "\\:")) - return normalize_win32_path (src, dst); + { + cygwin_conv_to_full_posix_path (src, dst); + return 0; + } if (!isslash (src[0])) { @@ -1704,7 +1707,7 @@ mount_info::conv_to_posix_path (const char *src_path, char *posix_path, if (!*p || !p[1]) nextchar = 0; - else if (*p == '/') + else if (isdirsep (*p)) nextchar = -1; else nextchar = 1; @@ -1755,8 +1758,7 @@ mount_info::conv_to_posix_path (const char *src_path, char *posix_path, { /* The use of src_path and not pathbuf here is intentional. We couldn't translate the path, so just ensure no \'s are present. */ - strcpy (posix_path, src_path); - // slashify (src_path, posix_path, trailing_slash_p); + slashify (src_path, posix_path, trailing_slash_p); } out: |