From 0c273f5ac39d68344a5ea988c40e2af271b6f39a Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Thu, 3 Apr 2008 15:44:18 +0000 Subject: [PATCH] * path.cc (mount_info::from_fstab): Get module path name of the Cygwin DLL, not the path of the application. --- winsup/cygwin/ChangeLog | 5 +++++ winsup/cygwin/path.cc | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 190ce3fcd..3d788d0be 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2008-04-03 Corinna Vinschen + + * path.cc (mount_info::from_fstab): Get module path name of the Cygwin + DLL, not the path of the application. + 2008-04-03 Corinna Vinschen Cleanup. diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc index c4da23c8f..6d4163582 100644 --- a/winsup/cygwin/path.cc +++ b/winsup/cygwin/path.cc @@ -2430,7 +2430,8 @@ mount_info::from_fstab (bool user) PWCHAR path = tp.w_get (); PWCHAR w; - if (!GetModuleFileNameW (NULL, path, NT_MAX_PATH)) + if (!GetModuleFileNameW (GetModuleHandleW (L"cygwin1.dll"), + path, NT_MAX_PATH)) { debug_printf ("GetModuleFileNameW, %E"); return false; -- 2.43.5