]> sourceware.org Git - newlib-cygwin.git/commitdiff
* mount.cc (mount_info::from_fstab): Skip native path prefix in
authorCorinna Vinschen <corinna@vinschen.de>
Tue, 29 Apr 2008 20:48:09 +0000 (20:48 +0000)
committerCorinna Vinschen <corinna@vinschen.de>
Tue, 29 Apr 2008 20:48:09 +0000 (20:48 +0000)
module path.

winsup/cygwin/ChangeLog
winsup/cygwin/mount.cc

index d095fe14d147798435227fbe3d94def007991602..231664b54fa0885965f98f1358f9ca00e2602fb9 100644 (file)
@@ -1,3 +1,8 @@
+2008-04-29  Corinna Vinschen  <corinna@vinschen.de>
+
+       * mount.cc (mount_info::from_fstab): Skip native path prefix in
+       module path.
+
 2008-04-29  Corinna Vinschen  <corinna@vinschen.de>
 
        * syscalls.cc (rename): Use volume serial numbers stored in path_conv
index e97121b83183f70727d06a83df6d4e0b4a29dd30..5fdef2d095a087e1cc967c5ec217e23d5a4bbf25 100644 (file)
@@ -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)
     {
This page took 0.030608 seconds and 5 git commands to generate.