* 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.
This commit is contained in:
@@ -200,8 +200,12 @@ DIR *
|
||||
fhandler_process::opendir ()
|
||||
{
|
||||
DIR *dir = fhandler_virtual::opendir ();
|
||||
if (dir && fileid == PROCESS_FD)
|
||||
fill_filebuf ();
|
||||
if (dir)
|
||||
{
|
||||
if (fileid == PROCESS_FD)
|
||||
fill_filebuf ();
|
||||
dir->__flags = 0;
|
||||
}
|
||||
return dir;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user