Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2012-06-21 13:33:19 +0400
committerCorinna Vinschen <corinna@vinschen.de>2012-06-21 13:33:19 +0400
commit797ff24dfbb0be5a7260bc0056b335ceefd741de (patch)
tree95cd731d573e45c3f3b6c92494b8a9fabef8e394 /winsup/cygwin/path.cc
parent978441cc0ea58a2f3fd5d84f1d0f50bc8307b34a (diff)
* 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.
Diffstat (limited to 'winsup/cygwin/path.cc')
-rw-r--r--winsup/cygwin/path.cc5
1 files changed, 4 insertions, 1 deletions
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;