]> sourceware.org Git - newlib-cygwin.git/commitdiff
* path.cc (path_conv::get_nt_native_path): Properly detect \\?\ paths.
authorCorinna Vinschen <corinna@vinschen.de>
Mon, 9 Oct 2006 14:01:52 +0000 (14:01 +0000)
committerCorinna Vinschen <corinna@vinschen.de>
Mon, 9 Oct 2006 14:01:52 +0000 (14:01 +0000)
(mount_info::conv_to_win32_path): Update comment.
* fhandler_disk_file.cc (path_conv::ndisk_links): Use backslashes
to make NT kernel functions work for \\?\GLOBALROOT paths.

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

index a122168e1d489b5efb0c6e92fd2dde4f387bf049..242325ca33a01e62b55624910719435a0b60c706 100644 (file)
@@ -1,3 +1,10 @@
+2006-10-06  David Jade  <d3@mutable.net>
+
+       * path.cc (path_conv::get_nt_native_path): Properly detect \\?\ paths.
+       (mount_info::conv_to_win32_path): Update comment.
+       * fhandler_disk_file.cc (path_conv::ndisk_links): Use backslashes
+       to make NT kernel functions work for \\?\GLOBALROOT paths.
+
 2006-10-09  Corinna Vinschen  <corinna@vinschen.de>
 
        * devices.in: Raise number of handled serial ports to 64.
index d330a750f3965bef0a7ac0f25435541ef57737b6..ae2c90d1f0d4a8e7b3ba3feb2e949961a86fe2db 100644 (file)
@@ -143,12 +143,12 @@ path_conv::ndisk_links (DWORD nNumberOfLinks)
   __DIR_mounts *dir = new __DIR_mounts (normalized_path);
   if (nNumberOfLinks <= 1)
     {
-      s = "/*";
+      s = "\\*";
       count = 0;
     }
   else
     {
-      s = "/..";
+      s = "\\..";
       count = nNumberOfLinks;
     }
 
index f7dccc01fdbabdcc3153a939a9b47fbc9fb9e298..cfe0735c52e67dab8fe9a20f01065706485ce76a 100644 (file)
@@ -526,13 +526,13 @@ path_conv::get_nt_native_path (UNICODE_STRING &upath)
     }
   else if (path[1] != '\\')            /* \Device\... */
     str2uni_cat (upath, path);
-  else if (path[2] != '.'
+  else if ((path[2] != '.' && path[2] != '?')
           || path[3] != '\\')          /* \\server\share\... */
     {
       str2uni_cat (upath, "\\??\\UNC\\");
       str2uni_cat (upath, path + 2);
     }
-  else                                 /* \\.\device */
+  else                                 /* \\.\device or \\?\foo */
     {
       str2uni_cat (upath, "\\??\\");
       str2uni_cat (upath, path + 4);
@@ -1661,8 +1661,9 @@ mount_info::conv_to_win32_path (const char *src_path, char *dst, device& dev,
     }
 
   MALLOC_CHECK;
-  /* If the path is on a network drive, bypass the mount table.
-     If it's // or //MACHINE, use the netdrive device. */
+  /* If the path is on a network drive or a //./ resp.//?/ path prefix,
+     bypass the mount table.  If it's // or //MACHINE, use the netdrive
+     device. */
   if (src_path[1] == '/')
     {
       if (!strchr (src_path + 2, '/'))
This page took 0.035613 seconds and 5 git commands to generate.