* 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.
This commit is contained in:
Corinna Vinschen 2012-06-21 09:33:19 +00:00
parent 978441cc0e
commit 797ff24dfb
2 changed files with 10 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2012-06-21 Corinna Vinschen <corinna@vinschen.de>
* 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 <me.cygwin2012@cgf.cx> 2012-06-18 Christopher Faylor <me.cygwin2012@cgf.cx>
* cygwait.h (LARGE_NULL): Define. * cygwait.h (LARGE_NULL): Define.

View File

@ -3206,11 +3206,14 @@ realpath (const char *path, char *resolved)
if (efault.faulted (EFAULT)) if (efault.faulted (EFAULT))
return NULL; 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; char *tpath;
if (isdrive (path)) if (isdrive (path))
{ {
tpath = tp.c_get (); tpath = tp.c_get ();
mount_table->cygdrive_posix_path (path, tpath, 0); mount_table->conv_to_posix_path (path, tpath, 0);
} }
else else
tpath = (char *) path; tpath = (char *) path;