diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 84e1ede2b..33699dde7 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,9 @@ +2012-06-21 Corinna Vinschen + + * path.cc (realpath): Call mount_info::conv_to_posix_path rather than + mount_info::cygdrive_posix_path to convert DOS paths to POSIX paths. + Add comment to explain why that's necessary at all. + 2012-06-18 Christopher Faylor * cygwait.h (LARGE_NULL): Define. diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc index 59e6de384..3b3958d8b 100644 --- a/winsup/cygwin/path.cc +++ b/winsup/cygwin/path.cc @@ -3206,11 +3206,14 @@ realpath (const char *path, char *resolved) if (efault.faulted (EFAULT)) return NULL; + /* Win32 drive letter paths have to be converted to a POSIX path first, + because path_conv lets the incoming path untouched except for converting + backslashes to forward slashes. */ char *tpath; if (isdrive (path)) { tpath = tp.c_get (); - mount_table->cygdrive_posix_path (path, tpath, 0); + mount_table->conv_to_posix_path (path, tpath, 0); } else tpath = (char *) path;