Open Bug 437767 Opened 17 years ago Updated 7 months ago

firefox deletes the temporary file used when opening a file with "open with"

Categories

(Firefox :: File Handling, defect)

All
Linux
defect

Tracking

()

People

(Reporter: pino, Unassigned)

References

Details

Attachments

(1 obsolete file)

User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; it; rv:1.8.1.14) Gecko/20080404 Iceweasel/2.0.0.14 (Debian-2.0.0.14-2) Build Identifier: Mozilla/5.0 (X11; U; Linux x86_64; it; rv:1.8.1.14) Gecko/20080404 Iceweasel/2.0.0.14 (Debian-2.0.0.14-2) (See steps.) Reproducible: Always Steps to Reproduce: Suppose to open a remote link in a webpage using an application selected in the "open with/save" dialog. Then Firefox downloads the remote file to a temporary location (and IMHO it should be a bit more smart, but this is bug #415441 already), and launches the application with the downloaded file. Good so far. Then, if we close Firefox but not the application, Firefox removes the downloaded temporary file. Actual Results: The application launched for the (temporary) file can have troubles if it wants to still make use of the file. Expected Results: Firefox should not implicitely remove the temporary file, but for example: - leave it around, either permanently or tracking the application launched with fork() [UNIX, of course] - manage explicitely it in the downloads, just like Opera does This was reported as problem in KDE's bugzilla for the KDE 4 application Okular: http://bugs.kde.org/show_bug.cgi?id=163363 If the users (after doing the steps before, eg fire Okular from Firefox and close Firefox) selects "Save copy as", they are not able to save it, because the only reference to the file (the temporary file, not even the remote URL that basically all the KDE applications can manage) is gone. Can also be reproduced with Firefox 3beta5: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9b5) Gecko/2008050509 Firefox/3.0b5
I don't know the situation on on linux but i expect that the temp file is locked by the helper application and Firefox should not be able to delete this file. Firefox itself must try to delete the file to clear the temp directory.
The helper application could also have no need to keep the file open all the time, for example by reading and "digesting" it all at once. But then, in case it wants to access it again for any reason you can think about, and Firefox was closed in the meanwhile, here the problems come. Confirmed also with Firefox 3.0rc2: Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.9) Gecko/2008052912 Firefox/3.0
Component: General → Download Manager
Product: Firefox → Toolkit
QA Contact: general → download.manager
confirming. not sure what we really want, but the temp file removal was communicated as being evil to be multiple times. not sure how evil leaving those files in $TMP would be perceived. at least debian/ubuntu clear $TMP by default on reboot so it might be ok.
Status: UNCONFIRMED → NEW
Ever confirmed: true
win32 doesn't delete the file and the helper applications are holding a file lock open on this files. I'm unsure about OS X. Leaving them in temp is no alternative solution for every os that doesn't delete the temp files. Some users will end with gigabyte of wasted space. It might be the best solution on Debian/ubuntu but what about Suse or Fedora ? Deleting on every reboot can be something that is not fast enough if you never reboot your linux system and the user downloads several iso files every day and opens them with a DVD-Burn application. (worst case scenario) Maybe watch if the helper application process is gone and delete it after that ?
Component: Download Manager → File Handling
Product: Toolkit → Core
QA Contact: download.manager → file-handling
This really annoying as it happens to me almost every month. Please fix this! (In reply to comment #4) > Maybe watch if the helper application process is gone and delete it after that > ? That might not work in all cases, since the helper application might execute other processes that need the file. (In reply to comment #4) > It might be the best solution on Debian/ubuntu but what about Suse or Fedora ? > Deleting on every reboot can be something that is not fast enough if you never > reboot your linux system and the user downloads several iso files every day and > opens them with a DVD-Burn application. (worst case scenario) Who cares? I don't now anyone who opens his iso files with DVD-Burn application right away. And I also think it isn't firefox business to clean up temporary files.
Any progress on this one? Sorry for the spam, but I can't understand why I am the only one frequently running into this bug (even on Windows!).
Any progress? I think it should be fixed on Linux at least (as the /tmp directory is cleaned up at every boot).
Product: Core → Firefox
Severity: normal → S3
Attachment #9386722 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: