indolering commented on Issue #235:
@programmerjake @sunfishcode
Note that the runtime behavior of checking for case-folded filenames is not
O(n^chars)
, it isO(files)
orO(log files)
: you just convert all of the filenames in a directory to a canonical case-folded name (toCasefold(NFC(filename))
) before you compare. This is known as caseless matching in Unicode parlance, which is fast and vectorizable.Wine and Samba run into issues with deeply nested directories:
/foo/bar/readme.txt
,/Foo/bar/readme.txt
. But that's because they are providing a compatibility layer for unmodified binaries. In our case, we could just throw an error when there are multiple casefolded matches.
Last updated: Nov 22 2024 at 17:03 UTC