Date: Mon, 4 Nov 1996 17:45:02 +0200 (IST) From: Eli Zaretskii To: Robert Hoehne Cc: DJGPP workers Subject: Re: Problems with opendir() and glob() In-Reply-To: Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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.