summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2006-01-19 18:55:07 +0000
committerChristopher Faylor <me@cgf.cx>2006-01-19 18:55:07 +0000
commit7b55b34c5e64c0d8140a43325540f75315855fff (patch)
treeb7774e3e613070d0152447cd238ab85545445ed0
parent9025f2aa7db8d74735ca47496ef988c1562be1c0 (diff)
downloadcygnal-7b55b34c5e64c0d8140a43325540f75315855fff.tar.gz
cygnal-7b55b34c5e64c0d8140a43325540f75315855fff.tar.bz2
cygnal-7b55b34c5e64c0d8140a43325540f75315855fff.zip
* fhandler_disk_file.cc (fhandler_disk_file::opendir): Check posix path for
root rather than windows path.
-rw-r--r--winsup/cygwin/ChangeLog5
-rw-r--r--winsup/cygwin/fhandler_disk_file.cc4
2 files changed, 7 insertions, 2 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 796d03cca..7aa883917 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,5 +1,10 @@
2006-01-19 Christopher Faylor <cgf@timesys.com>
+ * fhandler_disk_file.cc (fhandler_disk_file::opendir): Check posix path
+ for root rather than windows path.
+
+2006-01-19 Christopher Faylor <cgf@timesys.com>
+
* dir.cc (readdir_worker): Fill in invalid fields with -1. Accommodate
name change from __ino32 to __invalid_ino32.
* include/sys/dirent.h (__invalid_ino32): Rename from __ino32. Don't
diff --git a/winsup/cygwin/fhandler_disk_file.cc b/winsup/cygwin/fhandler_disk_file.cc
index 15d278d55..7243d591f 100644
--- a/winsup/cygwin/fhandler_disk_file.cc
+++ b/winsup/cygwin/fhandler_disk_file.cc
@@ -1335,7 +1335,7 @@ fhandler_disk_file::opendir ()
DIR *dir;
DIR *res = NULL;
size_t len;
- path_conv rootdir ("/");
+ path_conv rootdir ("/", PC_POSIX);
if (!pc.isdir ())
set_errno (ENOTDIR);
@@ -1381,7 +1381,7 @@ fhandler_disk_file::opendir ()
dir->__d_dirhash = get_namehash ();
res = dir;
- dir->__flags = strcasematch (pc, rootdir) ? dirent_isroot : 0;
+ dir->__flags = (pc.normalized_path[0] == '/' && pc.normalized_path[1] == '\0') ? dirent_isroot : 0;
}
syscall_printf ("%p = opendir (%s)", res, get_name ());