summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/dtable.cc
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/dtable.cc')
-rw-r--r--winsup/cygwin/dtable.cc12
1 files changed, 10 insertions, 2 deletions
diff --git a/winsup/cygwin/dtable.cc b/winsup/cygwin/dtable.cc
index 82009c943..8578cc76e 100644
--- a/winsup/cygwin/dtable.cc
+++ b/winsup/cygwin/dtable.cc
@@ -228,12 +228,20 @@ cygwin_attach_handle_to_fd (char *name, int fd, HANDLE handle, mode_t bin,
}
fhandler_base *
-dtable::build_fhandler (int fd, const char *name, HANDLE handle)
+dtable::build_fhandler (int fd, const char *name, HANDLE handle, path_conv *pc)
{
int unit;
DWORD devn;
- if ((devn = get_device_number (name, unit)) == FH_BAD)
+ if (!pc)
+ devn = get_device_number (name, unit);
+ else
+ {
+ pc->check (name);
+ devn = pc->get_devn ();
+ }
+
+ if (devn == FH_BAD)
{
struct sockaddr sa;
int sal = sizeof (sa);