diff options
author | Christopher Faylor <me@cgf.cx> | 2005-08-19 16:18:42 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2005-08-19 16:18:42 +0000 |
commit | 358063ace374e05025d124a17a0167b818b666ea (patch) | |
tree | 141d05fd45248dc6e1ebe017100900c8bf7cc2e6 /winsup/cygwin/dir.cc | |
parent | 82ef66c933bb3d90a8a27a0c6c18a9b9bfe3d8bc (diff) | |
download | cygnal-358063ace374e05025d124a17a0167b818b666ea.tar.gz cygnal-358063ace374e05025d124a17a0167b818b666ea.tar.bz2 cygnal-358063ace374e05025d124a17a0167b818b666ea.zip |
* fhandler.h (dirent_states): Add dirent_isroot, dirent_saw_cygdrive,
dirent_saw_dev.
* dir.cc (opendir): Don't zero __flags here. Push that responsibility to
opendir methods.
(seekdir): Preserve dirent_isrrot in __flags.
(rewinddir): Ditto.
* fhandler_disk_file.cc (fhandler_disk_file::opendir): Set dirent_isroot
appropriately.
(fhandler_disk_file::readdir): Fill in "cygdrive" and "dev" if it is the root
dir and they are missing.
* fhandler_process.cc (fhandler_process::opendir): Set __flags here.
* fhandler_virtual.cc (fhandler_virtual::opendir): Set __flags here.
Diffstat (limited to 'winsup/cygwin/dir.cc')
-rw-r--r-- | winsup/cygwin/dir.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/winsup/cygwin/dir.cc b/winsup/cygwin/dir.cc index 254906a6e..894691d8f 100644 --- a/winsup/cygwin/dir.cc +++ b/winsup/cygwin/dir.cc @@ -59,7 +59,7 @@ opendir (const char *name) } if (res) - res->__flags = 0; + /* nothing */; else if (fh) delete fh; return res; @@ -169,7 +169,7 @@ seekdir64 (DIR *dir, _off64_t loc) if (dir->__d_cookie != __DIRENT_COOKIE) return; - dir->__flags = 0; + dir->__flags &= dirent_isroot; return ((fhandler_base *) dir->__fh)->seekdir (dir, loc); } @@ -190,7 +190,7 @@ rewinddir (DIR *dir) if (dir->__d_cookie != __DIRENT_COOKIE) return; - dir->__flags = 0; + dir->__flags &= dirent_isroot; return ((fhandler_base *) dir->__fh)->rewinddir (dir); } |