To: Eric Backus Cc: dj AT ctron DOT com, djgpp AT sun DOT soe DOT clarkson DOT edu, dank AT blacks Subject: Re: stat("/") fails Date: Tue, 07 Jul 92 17:38:07 MDT From: dank AT blacks DOT jpl DOT nasa DOT gov Eric writes: >/ isn't a file, and it doesn't exist in another directory's file >listing, but it IS a directory. I bet you're right about it not >working with Turbo-C. But it certainly works on UNIX, and if anyone >knows a good workaround for this on DOS, I'd like to see it. > >Seems like we could have the stat() function examine the first >argument. If it's the root directory, fill in the stat buffer >appropriately and then return it. If it's not the root directory, >jump to "turbo_assist" and let Turbo-C handle it. Maybe I'll give >this some work tonight. Be aware that the same problem may exist for aliases for /, i.e. .. when the working directory is /foo, etc. This problem has been with MS-DOS since hierarchical file systems were introduced; an ls that I & Chris Worrell wrote in assembler in 1984 suffered from it. - Dan K.