[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

opendir() on VFAT



Hi!
 
I've got a question to readdir() on NEWFATFS:
Is it ok, that this function delivers lowercase filenames when reading
it from VFAT? opendir() do the following check when opening a directory:

        /* test if the file system is case sensitive */
        r = Dpathconf(name, 6);
        if (r > 0)
                d->status = _NO_CASE;
        else
                d->status = 0;

If status is _NO_CASE, readdir() lowers the filename before returing it.
What's about changing the check in opendir() to (r == 1)? With this
check upper/mixed-case filenames will be kept e.g. when copying
recursivly with `cp -r dir` from one VFAT to another.

Any comments? IMO there is only one big disadvantge of this patch: all 
programs which use opendir() have had to recompile :-(

 Chris.
 
------------------------------------------------------------------------
 Christian Felsch   email: felsch@tu-harburg.de         (Big mails, uue)
 Bevenser Weg 18           christian_felsch@hh.maus.de  (Mails < 16K)
 21079 Hamburg
 Germany            WWW  : http://www.tu-harburg.de/~smcf1605/   
------------------------------------------------------------------------