silverstripe/sapphire — pull request #901 by halkyon (2012-10-29 04:11:56+00:00)
Title: BUG FileNameFilter should remove any amount of underscores from start of...

... filename

When a user renames a file to "__test.txt" (two underscores or more),
then FileNameFilter will only remove the very first underscore from the
filename. This is not sufficient, as any number of underscores in the
filename will be problematic when Filesystem::sync() is called, it will
remove that File record thinking it's an internal file. This fixes it
so any number of underscores are stripped out at the start of the filename.