Date: Wed, 18 Sep 1996 14:53:46 +0200 (IST) From: Eli Zaretskii To: Mark Habersack Cc: djgpp AT delorie DOT com, DJ Delorie Subject: Re: 1 bug(?) open/readdir & glob In-Reply-To: Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Wed, 18 Sep 1996, Mark Habersack wrote: > which has a Hid/Sys attribute set doesn't get reported. This is inconsistent > (at least in case of readdir()) with the documentation and behavior on Unix. > readdir() is supposed to return EVERY entry in directory. On Unix it reads > physical dirents, reporting all of them. I consider this being a bug because > it causes the code to work differently on MS-DOG and Unix. This is one area where the desire to be compatible with both Unix and MSDOS lead to contradiction that has to be resolved in a somewhat kludgy (IMHO) way. Since on MSDOS the hidden files aren't usually shown, `readdir' doesn't ask for them. If you make `readdir' behave otherwise, MSDOS programs which use `readdir' will suffer. Portable programs that absolutely must see all the directory entries, should set the bits in the `__opendir_flags' variable (look it up in the library docs) to that effect.