summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/path.cc
diff options
context:
space:
mode:
authorPierre Humblet <phumblet@phumblet.no-ip.org>2005-05-09 02:39:34 +0000
committerPierre Humblet <phumblet@phumblet.no-ip.org>2005-05-09 02:39:34 +0000
commitadef8db0ae5ed1eb6f8edb88b2685ea6316ea35f (patch)
tree0f8051216bf246b6b091c948b3ad3e0042ba0712 /winsup/cygwin/path.cc
parentf991d0e53ebed74e93a7d0ff4c878ed0f37f2742 (diff)
downloadcygnal-adef8db0ae5ed1eb6f8edb88b2685ea6316ea35f.tar.gz
cygnal-adef8db0ae5ed1eb6f8edb88b2685ea6316ea35f.tar.bz2
cygnal-adef8db0ae5ed1eb6f8edb88b2685ea6316ea35f.zip
2005-05-09 Pierre Humblet <pierre.humblet@ieee.org>
* fhandler.h (class fhandler_netdrive): New class. * fhandler_netdrive.cc (fhandler_netdrive::fhandler_netdrive): New constructor. (fhandler_netdrive::exists): New method. (fhandler_netdrive::fstat): Ditto. (fhandler_netdrive::readdir): Ditto. (fhandler_netdrive::open): Ditto. * dtable.cc (build_fh_pc): Handle case FH_NETDRIVE. * path.cc (isvirtual_dev): Add FH_NETDRIVE. (mount_info::conv_to_win32_path): Detect netdrive device and bypass mount search for network paths.
Diffstat (limited to 'winsup/cygwin/path.cc')
-rw-r--r--winsup/cygwin/path.cc16
1 files changed, 15 insertions, 1 deletions
diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc
index 49aeea4b3..71275d652 100644
--- a/winsup/cygwin/path.cc
+++ b/winsup/cygwin/path.cc
@@ -154,7 +154,8 @@ struct win_shortcut_hdr
(path_prefix_p (proc, (path), proc_len))
#define isvirtual_dev(devn) \
- (devn == FH_CYGDRIVE || devn == FH_PROC || devn == FH_REGISTRY || devn == FH_PROCESS)
+ (devn == FH_CYGDRIVE || devn == FH_PROC || devn == FH_REGISTRY \
+ || devn == FH_PROCESS || devn == FH_NETDRIVE )
/* Return non-zero if PATH1 is a prefix of PATH2.
Both are assumed to be of the same path style and / vs \ usage.
@@ -1517,6 +1518,19 @@ 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 (src_path[1] == '/')
+ {
+ if (!strchr (src_path + 2, '/'))
+ {
+ dev = *netdrive_dev;
+ set_flags (flags, PATH_BINARY);
+ }
+ backslashify (src_path, dst, 0);
+ /* Go through chroot check */
+ goto out;
+ }
if (isproc (src_path))
{
dev = *proc_dev;