summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/path.cc
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/path.cc')
-rw-r--r--winsup/cygwin/path.cc3
1 files changed, 2 insertions, 1 deletions
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;