Closed pimzand closed 2 years ago
Well, at least the purpose of the code is commented now in the source.
I created it to prevent directory names that end with a dot, like "R.E.M.". Filenames or directory names that end with a dot are illegal in Windows. Either the dot gets lost (when copied to a FAT filesystem), or the directory name is garbled (when shared by Samba).
My fix is to append a zero-width space. unusable character: r"/.$/" replacement character: ".\u200b"
I really like this not-ugly-but-very-elegant hack ;-)
A separate option would clutter them even more. Yes, "unusable_chars" is no longer entirely fitting, but as long as it's documented, I'm fine with it. Better than renaming the option.
Close?
I could have left the rule to enclose the regex pattern in slashes out, treating every multi-character "character" as a regex pattern. But I'm fine too with it, especially because you are. Closing.
It should either get its own configuration, or be documented properly