]> sourceware.org Git - newlib-cygwin.git/commitdiff
* fhandler_disk_file.cc (fhandler_disk_file::opendir): Check posix path for
authorChristopher Faylor <me@cgf.cx>
Thu, 19 Jan 2006 18:55:07 +0000 (18:55 +0000)
committerChristopher Faylor <me@cgf.cx>
Thu, 19 Jan 2006 18:55:07 +0000 (18:55 +0000)
root rather than windows path.

winsup/cygwin/ChangeLog
winsup/cygwin/fhandler_disk_file.cc

index 796d03cca3d00b5147566b542c0b971543591d69..7aa883917eb8b22e1748f6143314f0cc4d32b4b1 100644 (file)
@@ -1,3 +1,8 @@
+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
index 15d278d5587ebaed8cbb895d92a3108572fb48c4..7243d591f36dab9ad6ec13092cf84d053174069c 100644 (file)
@@ -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 ());
This page took 0.034112 seconds and 5 git commands to generate.