summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/fhandler_disk_file.cc
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/fhandler_disk_file.cc')
-rw-r--r--winsup/cygwin/fhandler_disk_file.cc12
1 files changed, 2 insertions, 10 deletions
diff --git a/winsup/cygwin/fhandler_disk_file.cc b/winsup/cygwin/fhandler_disk_file.cc
index 9ee487dc1..ebdc806e2 100644
--- a/winsup/cygwin/fhandler_disk_file.cc
+++ b/winsup/cygwin/fhandler_disk_file.cc
@@ -2384,16 +2384,8 @@ fhandler_cygdrive::open (int flags, mode_t mode)
set_errno (EISDIR);
return 0;
}
- /* Open a fake handle to \\Device\\Null, but revert to the old path
- string afterwards, otherwise readdir will return with an EFAULT
- when trying to fetch the inode number of ".." */
- tmp_pathbuf tp;
- char *orig_path = tp.c_get ();
- stpcpy (orig_path, get_win32_name ());
- pc.set_path (dev ().native);
- int ret = fhandler_base::open (flags, mode);
- pc.set_path (orig_path);
- return ret;
+ /* Open a fake handle to \\Device\\Null */
+ return open_null (flags);
}
void