Re: case sensitive file names
Andreas Leitgeb wrote:
Mike Schilling <mscottschilling@hotmail.com> wrote:
I must be missing something. Unless there are filesystems which
*report* filenames inconsistently (i.e.call a file aaa.txt on
Monday
and AAA.TXT on Tuesday), why do you care whether the file system is
case-sensitive or not?
Let's assume a case-INsensitive filesystem.
On monday, there is a file aaa.txt with contents "foo"
On tuesday, this file is edited by someone (e.g. using an
old msdos-editor), so the new file with content "bar"
now happens to be named AAA.TXT
Now, the backup-tool sees it as a different file, and
adds it to the archive.
And marks "aaa.txt" as having been deleted, since it no longer exists.
Then, 42 days later, this file has to be restored.
It's now a matter of luck (actually of how the
unpacker deals with it) whether aaa.txt or AAA.TXT
(but not both!) remain after unpacking.
If you specifically restore aaa.txt it will not even
have a look at AAA.TXT, so you'll definitely restore
the one with obsolete contents.
There are lots of cases: let's try to go through them.
1. If you're restoring the entire state of the world before the
renaming, AAA.TXT gets deleted and aaa.txt recreated. This is
correct.
2. If you're restoring the state of that directory before the
renaming, likewise.
3. If you're restoring specifically AAA.TXT, it gets deleted. Feel
free to prompt that there's an aaa.txt, and ask the user if he'd like
that instead. Even in a case-sensitive filesystem, he might.
4. If you're restoring specifically aaa.txt, it gets restored and
AAA.TXT gets (implictly) deleted.. This is correct.
No doubt I've left something out.