* path.cc (mount_info::from_fstab): Get module path name of the Cygwin

DLL, not the path of the application.
This commit is contained in:
Corinna Vinschen 2008-04-03 15:44:18 +00:00
parent ba047ace14
commit 0c273f5ac3
2 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2008-04-03 Corinna Vinschen <corinna@vinschen.de>
* 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 <corinna@vinschen.de> 2008-04-03 Corinna Vinschen <corinna@vinschen.de>
Cleanup. Cleanup.

View File

@ -2430,7 +2430,8 @@ mount_info::from_fstab (bool user)
PWCHAR path = tp.w_get (); PWCHAR path = tp.w_get ();
PWCHAR w; PWCHAR w;
if (!GetModuleFileNameW (NULL, path, NT_MAX_PATH)) if (!GetModuleFileNameW (GetModuleHandleW (L"cygwin1.dll"),
path, NT_MAX_PATH))
{ {
debug_printf ("GetModuleFileNameW, %E"); debug_printf ("GetModuleFileNameW, %E");
return false; return false;