I believe there is a bug in WordPress, I have checked the web version of the repository to see if I can find this reported anywhere, to no avail. Please, if this is not the right place to post, or if the issue is already reported somewhere, please disregard this.
In line 1153 of
$filename = str_replace('%', '', sanitize_title_with_dashes( $filename ) ) . $ext;
unless I’m mistaken should read:
$filename = str_replace('%', '', sanitize_file_name( $filename ) ) . $ext;
This solved a problem for me where any file I uploaded that had a period in the name (other than for the extension) was getting dropped. For example, test.tar.gz becomes testtar.gz and myfile.html.snippet becomes myfilehtml.snippet.
Again, if I need to report this elsewhere, please let me know. I didn’t really see a way to report a bug in Trac; maybe I’m just not looking in the right place.
Edit: I’m using WordPress MU 1.5.1, the latest version as of this posting.
- The topic ‘Possible bug in wp_unique_filename in functions.php’ is closed to new replies.