The SBCL test doesn't show any signs of Faré fixing this so that the directory components on windows are treated as case-INsensitive (test-utilities.script failed).
Oops, reading the CLHS, I see that EQUALP specifically does NOT descend into pathnames, unlike other structures, and just calls EQUAL on them.
I just committed f9105317 that uses EQUALP on the namestrings instead. Sigh.
Hmmmm.... I don't see any change to uiop/pathname.lisp. Faré, what's the right choice here? Should we be changing the definition of =? in PATHNAME-EQUAL to use EQUALP instead of EQUAL on Windows?
I think we shouldn't, but there could be an explicit PATHNAME-EQUALP, and/or a &key argument to PATHNAME-EQUAL.
This seems heuristically right, but absolutely wrong. In the absolute case, we should somehow interrogate the filesystem to ask it whether filenames are case-sensitive or not.
Suggetion: we could hook this by calling a new function CASE-SENSITIVE-FILESYSTEM-P and using EQUAL or EQUALP according to the return value. For now we butcher a check for windows into CASE-SENSITIVE-FILESYSTEM-P and leave it at that. Later we try to do better.
What say?
Problem, with mount points, etc., how do you identify whether a filesystem is case-sensitive or not? First, how do you identify the "current mount point"? Or do you just try to write in a given directory? What if you have no write access? Do you look at inodes (does Windows give out inode information?) and try to open a file with case switched? What if there's a symlink with the case switched? There are so many corner cases and potential race conditions that any heuristic is going to lose at some point, in addition to the Right Thing requiring system calls that are not available without CFFI.
I recommend we just let the user choose between PATHNAME-EQUAL and PATHNAME-EQUALP, or some such.
(For the matter, why does SBCL return lower case for Users? Where does it (or the system call it uses) normalize to lowercase?)
—♯ƒ • François-René ÐVB Rideau •Reflection&Cybernethics• http://fare.tunes.org A great civilization is not conquered from without until it destroys itself from within. — Will Durant