Mail Archives: djgpp-workers/1996/11/04/10:54:02
On Mon, 4 Nov 1996, Robert Hoehne wrote:
> reported in some other environments (network, ...) but for a
> subst drive, findfirst for "s:/" (if s is substed) does not
> report "." but findfirst for "s:/*.*" reports ".". The result of
I think that's a bug in `opendir'. Here is a fragment which seems to be
the culprit:
dir->need_fake_dot_dotdot = 0;
if (dir->name[1] == ':' && dir->name[2] == '/' && dir->name[3] == 0)
{
/* see if findfirst finds "." anyway */
int done = findfirst(dir->name, &dir->ff, FA_ARCH|FA_RDONLY|FA_DIREC|FA_SYSTEM);
if (done || strcmp(dir->ff.ff_name, "."))
dir->need_fake_dot_dotdot = 2;
}
Unless I miss something, it should have appended something to dir->name
(like "/." or "/.." or "/*.*") before calling `findfirst', right? I will
submit the patches after trying this with `ls', if nobody tells me that
I'm wrong.
- Raw text -