Re: rename() on vfat partition "bug"

Paul H. Hargrove (hargrove@sccm.Stanford.EDU)
Sun, 20 Apr 1997 12:27:09 -0700 (PDT)


Vladimir Volovich writes:
[snip]
> Since vfat filesystem is capable to store the case of filename
> (but is not capable to distinguish filenames wich differ only by case),
> it seems to be a Right Thing, if rename() would actually rename a file.
> This problem is closely connected with the problem raised here
> earlier: may be, stat(), open() of an existing file and some other
> syscalls should >not< be case sensitive on a vfat filesystem, but
> creat() should correctly store the case of letters in the creating
> filename?
[snip]

The is exactly the way I have implemented the HFS filesystem, which
also preserves case but is not case sensitive. None of the syscalls
are case sensitive in the sense that if you request "filename" and
"Filename" exists, then you get "Filename". The rename call handles
the "fillename" -> "Filename" move as a special case. creat() (which
really ends up using the open() code) will create the file with the
specified case if it doesn't yet exist in any case variation. I agree
that this seems like the most usable behavior, and suggest that vfat
do likewise.

-- 
Paul H. Hargrove                   All material not otherwise attributed
hargrove@sccm.stanford.edu         is the opinion of the author or a typo.