Subject: Re: CVS commit: src
To: der Mouse <mouse@Rodents.Montreal.QC.CA>
From: Feico Dillema <feico@pasta.cs.uit.no>
List: tech-kern
Date: 07/01/2005 08:51:08
On Wed, Jun 29, 2005 at 07:54:55PM -0400, der Mouse wrote:
> very much what's being talked about here: if you have a file /foo/bar,
> then you can treat it as a directory; if you do so, the directory you
> see contain various files with fixed names whose contents are the
> various pieces of that additional structure (possibly things other than
> files, such as symlinks - I forget the details).  It worked fine.

And we're still using your code including the `treat a file as a
directory'. However, getcwd() doesn't like the current dir to be in a
file anymore (I think since NetBSD-1.6). getcwd seems to backtrace the
path and check it for sanity; and not finding the current `dir' in the
parent when readdir-ing it (which only shows the file) causes it to
bail out. Otherwise, it works fine (and we haven't investigated how to
safely fix getcwd). 

For our purposes it was really nice that the normal apps only ever saw
the file and treated it as such, while the user or adjusted tools knew
that you could treat the file as a directory. Whether you feel cd-ing
into a file is a gross or elegant solution probably depends on your
upbringing ;-}.

Feico.