Simetrical wrote:
However, we don't *really* have to use the same
name in the filesystem
as we use as a title. This seems to me like it would be better
implemented by mangling the filename somehow. The invalid Windows/DOS
characters are supposedly:
? [ ] / \ = + < > : ; " ,
Of those, I think the following are currently legal in image names
(before your commit):
? \ = + : ; " ,
'\' would be excluded by wfBaseName(), and ':' is explicitly stripped in
UploadForm::internalProcessUpload().
The others may have been allowed previously, though at least ?, ;, and "
seem unwise. :)
My recommendation is to ditch the use of raw filesystem filenames --
which already fail on Windows due to the weird charset encoding system
breaking any non-ASCII characters -- and allow media files to have any
name in the database, while they're stored with a nice clean content
hash on the filesystem (when a filesystem is used at all as backend).
This has been planned for a long time, but implementation has gotten
stalled while other things get done. (Though we already store deleted
files in this way, and it works pretty well.)
-- brion