Re: rename() on vfat partition "bug"

Gordon Chaffee (chaffee@bugs-bunny.CS.Berkeley.EDU)
Mon, 21 Apr 1997 11:00:54 -0700 (PDT)

> 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?

I agree that rename does the wrong thing in this case, but I have to
disagree on automatically writing to the same file with a different
case. The reason I chose the behavior I did with vfat was because
this is Unix and not Windows. I've seen quite a few source distributions
with both Makefile and makefile in the same directory, and I wanted
to see an error before one overwrote the other while unpacking a
tar distribution. Additionally, if I did a cp * /vfat_partition/,
I wanted to see an error if this sort of thing occurred.

I do agree that this behavior would be useful if handled by a mount
option, and the default behavior might be to automatically overwrite.

Gordon Chaffee