Closed Bug 1615075 Opened 5 years ago Closed 5 years ago

Linux Firefox silently replaces colons with spaces in filename when saving a file

Categories

(Firefox :: File Handling, defect)

72 Branch
Unspecified
Linux
defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: nanotube, Unassigned)

References

Details

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:72.0) Gecko/20100101 Firefox/72.0

Steps to reproduce:

On Firefox 72.0.2 on Linux 64bit, Ubuntu 18.04. Using stock build downloaded from mozilla releases server, not from Ubuntu repositories. With fresh profile with no extensions or modifications.

Tried to save any file from the web and attempt to include a colon in the filename, such as "lorem:ipsum.jpeg" e.g.

Actual results:

Firefox seems to silently replace any colons with spaces when saving a file. So a file that should have been e.g. "lorem:ipsum.jpeg" is saved as "lorem ipsum.jpeg".

Expected results:

Since colons are perfectly fine in linux filenames, firefox should save the file with desired filename.
This has been reproduced with firefox 70 build as well.
Firefox ESR 68 build does not have this problem.
So this regression must have been introduced at some point after the 68 release.

Component: Untriaged → File Handling
OS: Unspecified → Linux

This was a deliberate change in bug 1562176. Colons are meaningful in URLs, even if they're not reserved characters in filesystems, and so we filter them out to avoid surprises when we save files as part of saving an entire webpage.

In theory, we could avoid doing this filtering on Linux in the case where you save an individual file, but that type of specialcasing is prone to bugs and I don't think the restriction is onerous to the point that it's worth introducing added complexity and fragility just to allow saving of images with colons in the name including those colons.

Status: UNCONFIRMED → RESOLVED
Closed: 5 years ago
Resolution: --- → WONTFIX

I'm very pessimistic as regard to whether anyone will see my comment let alone respond or do anything about it. But this behaviour is UX hostile. I use colons in filenames to separate fields. I'm saving pdf files from my gmail interface one by one (I don't have to do this often, but I accumulated a number of them over several years). I name files explicitly every time because I have "Always ask you where to save files" enabled. I saved some files in December 2020 and I needed them today. I spent probably an hour if not more trying to find those files and questioning my sanity. I totally understand this approach when files are saved without user interaction. But to ask for a file name and then silently mangle it? Is there a universe where this logic is not flawed?

See Also: → 1694553
You need to log in before you can comment on or make changes to this bug.