From 661efd2deaf2042829683112411be7f7902abe13 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Tue, 29 Apr 2008 20:48:09 +0000 Subject: [PATCH] * mount.cc (mount_info::from_fstab): Skip native path prefix in module path. --- winsup/cygwin/ChangeLog | 5 +++++ winsup/cygwin/mount.cc | 9 ++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index d095fe14d..231664b54 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2008-04-29 Corinna Vinschen + + * mount.cc (mount_info::from_fstab): Skip native path prefix in + module path. + 2008-04-29 Corinna Vinschen * syscalls.cc (rename): Use volume serial numbers stored in path_conv diff --git a/winsup/cygwin/mount.cc b/winsup/cygwin/mount.cc index e97121b83..5fdef2d09 100644 --- a/winsup/cygwin/mount.cc +++ b/winsup/cygwin/mount.cc @@ -871,7 +871,8 @@ bool mount_info::from_fstab (bool user) { tmp_pathbuf tp; - PWCHAR path = tp.w_get (); + PWCHAR path_buf = tp.w_get (); + PWCHAR path = path_buf; PWCHAR w; if (!GetModuleFileNameW (GetModuleHandleW (L"cygwin1.dll"), @@ -880,6 +881,12 @@ mount_info::from_fstab (bool user) debug_printf ("GetModuleFileNameW, %E"); return false; } + if (!wcsncmp (path, L"\\\\?\\", 4)) + { + path += 4; + if (path[1] != L':') + *(path += 2) = L'\\'; + } w = wcsrchr (path, L'\\'); if (w) { -- 2.43.5