Wordpress is automatically adding a trailing slash to my custom upload folder in Settings » Media. This is causing upload URLs (for example, for images uploaded through the Media Uploader) to get a double slash, as in example.com/files//myfile.jpg
Here's what happens:
I go to Settings » Media
Under Uploading Files in the field labeled Store uploads in this folder, I type in
files
, with no trailing slash. (This is consistent with the example listed next to the text field:Default is wp-content/uploads
)Hit "Save Changes"
The page reloads, and the upload folder is now
files/
, with a trailing slash.
I have tested other URLs (files/myfiles
, uploads
), and Wordpress always adds a trailing slash when I hit save. I have Organize my uploads into month- and year-based folders unchecked.
What gives? How do I fix this?
I am on 3.3.1, but this was happening in 3.2 as well.