diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2006-10-09 14:01:52 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2006-10-09 14:01:52 +0000 |
commit | b9c7deed9a3b1fc602f424426ab532b528ce782e (patch) | |
tree | 1924564dc66ea6ff26785460129ed25f50a49043 | |
parent | 5623fbd4caa92c670828de4ec9e6f24370c43614 (diff) | |
download | cygnal-b9c7deed9a3b1fc602f424426ab532b528ce782e.tar.gz cygnal-b9c7deed9a3b1fc602f424426ab532b528ce782e.tar.bz2 cygnal-b9c7deed9a3b1fc602f424426ab532b528ce782e.zip |
* 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.
-rw-r--r-- | winsup/cygwin/ChangeLog | 7 | ||||
-rw-r--r-- | winsup/cygwin/fhandler_disk_file.cc | 4 | ||||
-rw-r--r-- | winsup/cygwin/path.cc | 9 |
3 files changed, 14 insertions, 6 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index a122168e1..242325ca3 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -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. diff --git a/winsup/cygwin/fhandler_disk_file.cc b/winsup/cygwin/fhandler_disk_file.cc index d330a750f..ae2c90d1f 100644 --- a/winsup/cygwin/fhandler_disk_file.cc +++ b/winsup/cygwin/fhandler_disk_file.cc @@ -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; } diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc index f7dccc01f..cfe0735c5 100644 --- a/winsup/cygwin/path.cc +++ b/winsup/cygwin/path.cc @@ -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, '/')) |