Add a file field to a content type and set 'gz' (without quotes) as the only accepted suffix. Then, upload two files with the following names:
- foo.gz
- foo.tar.gz
The files are correctly uploaded, but the name of the latter is changed to foo.tar_.gz (note the added underscore), which is unexpected (I see no reason why the name should be changed).
Go back to the file field and set the accepted suffixes to 'tar gz'. Now the above file names are correctly preserved. This has a side effect, though, since file names of the form 'foo.tar' can be uploaded, too (and maybe this is not what ther user wants).
Finally, note that using 'tar.gz' as an accepted suffix for a given file field does not allow you to upload files whose names end with tar.gz, so this is not a solution.
Comments
Comment #1
dddave commentedI know this behavior from D6 and don't think it constitutes a bug. Although I don't know the reason why the underscore is added (with po files the reason seems to be security) I would suspect multiple bug reports earlier if this behavior was bogus.