Closed Bug 1322134 Opened 8 years ago Closed 7 years ago

Downloading files whose name starts with '.' doesn't preserve their name

Categories

(Firefox :: File Handling, defect)

49 Branch
defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: claudiu.saiz, Unassigned)

Details

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:49.0) Gecko/20100101 Firefox/49.0
Build ID: 20161028133011

Steps to reproduce:

OS: Linux Mint 17
Firefox version: 49.0.2 (also reproduces with 50.0.2)

I downloaded an attachment file named '.vimrc'.


Actual results:

The file on disk was not saved with the same name as on the web server, but with the dot removed. In this case the file was saved on disk as 'vimrc'.


Expected results:

The file should have been saved with the same name as on the web server.
Link to the file, please?
Component: Untriaged → File Handling
Flags: needinfo?(claudiu.saiz)
I can't of course post a link to the e-mail attachment, but here is a file you can use to reproduce the bug: http://s000.tinyupload.com/?file_id=91166544173940996769

Or simpler, if you have a webserver lying around, just create a file starting with '.' on it and try to download it.
Flags: needinfo?(claudiu.saiz)
It's probably by design, see bug 346994.
bug 346994 isn't in a done state, so I don't know if a consensus was reached on this.

In my opinion this is really bad behavior, it should at least give you an option or notify you that it's changing the file name. I've wasted time trying to figure out why the configuration doesn't work when in fact the file's name wasn't even saved correctly.
(In reply to claudiu.saiz from comment #4)
> In my opinion this is really bad behavior, it should at least give you an
> option or notify you that it's changing the file name. I've wasted time
> trying to figure out why the configuration doesn't work when in fact the
> file's name wasn't even saved correctly.

I understand that it can add more steps when you want to save a configuration file intentionally, but we have to strip the leading dot because, if we didn't do this, users could inadvertently overwrite their configuration files, resulting in security issues and data loss. We'd rather require more discipline from experienced users who actually need to edit their configuration files, than provide a way to corrupt the system inadvertently.

This is covered in more detail in bug 290720.

Because of this, sites that offer downloads of sample configuration files should add a reminder to check the file name after the download finished.

> bug 346994 isn't in a done state, so I don't know if a consensus was reached
> on this.

This bug was about stripping the leading dot in SeaMonkey, and it's been implemented, so I've marked the bug as resolved.
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.