OSDN Git Service

* path.cc (mount_info::from_fstab): Get module path name of the Cygwin
authorcorinna <corinna>
Thu, 3 Apr 2008 15:44:18 +0000 (15:44 +0000)
committercorinna <corinna>
Thu, 3 Apr 2008 15:44:18 +0000 (15:44 +0000)
DLL, not the path of the application.

winsup/cygwin/ChangeLog
winsup/cygwin/path.cc

index 190ce3f..3d788d0 100644 (file)
@@ -1,5 +1,10 @@
 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>
+
        Cleanup.
        * exceptions.cc (windows_system_directory): Make static.  Convert to 
        WCHAR.
index c4da23c..6d41635 100644 (file)
@@ -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;