Closed Bug 431021 Opened 16 years ago Closed 16 years ago

Should make temporary downloaded files-read only

Categories

(Toolkit :: Downloads API, defect)

x86
Linux
defect
Not set
normal

Tracking

()

VERIFIED DUPLICATE of bug 280419

People

(Reporter: Nikolaus, Unassigned)

References

Details

User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9b5) Gecko/2008041514 Firefox/3.0b5 Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9b5) Gecko/2008041514 Firefox/3.0b5 When firefox downloads a file and the user chooses to open this file directly with an application (openoffice, gedit ..), the file is saved in a temporary folder. The file is removed by firefox at some later point (I couldn't figure out when exactly). The problem is that in the application, the user is presented with a completely normal, writable file. An average user can not know that any changes he makes will be lost *even if he saves the file*, because the application does not ask for a new filename. But also as a more experienced user I often forget that I am dealing with a temporary file. I assume that my data is safe when I press save. If for some reason the data cannot be saved (because it was downloaded from the net), I expect to be asked for a new filename. Although this is neither a real firefox nor openoffice (or gedit etc) bug, it easily leads to dataloss. I see three options to fix this: 1) Firefox should mark downloaded files read only when they are just temporary. This will hopefully cause applications to show the correct behaviour when changes are made. 2) Firefox should not delete temporary files if they have been changed. Problem here is that the file still has an obscure name and sits in a tmp directory. 3) Firefox should tell the called application to show the data without associating it with a filename. This would be the best option, but it is most likely not possible to implement for all files. Reproducible: Always
If it's in /tmp (when you open directly in an application), then it should have been solved by bug 280419. The file is also supposed to be deleted when the application exits. You should be able to control this behavior with the boolean variable browser.helperApps.deleteTempFileOnExit in about:config (doesn't exists by default, default is true, except for Mac OS X). But when the file is not supposed to be deleted, then the permissions are not set. If the file is first downloaded in the downloads directory (or on the desktop), then it should be writable.
True, sorry about the dup.
Status: UNCONFIRMED → RESOLVED
Closed: 16 years ago
Resolution: --- → DUPLICATE
But why did you see it in Firefox 3.0 - it's supposed to have been fixed. Did you set browser.helperApps.deleteTempFileOnExit to false ?
I didn't see in it Firefox 3.0 but in Firefox 2. This was originally an Ubuntu bug and I forwarded it upstream without checking if it may have been fixed since the initial report - my bad.
Verified dup
Status: RESOLVED → VERIFIED
Product: Firefox → Toolkit
You need to log in before you can comment on or make changes to this bug.