Automatically deleting PDF files upon quit
I am using Firefox 14.0.1 on Mac OS X 10.6.8. As of today, any PDF file downloaded using Firefox deletes itself immediately when I quit the program. I can download a PDF—any PDF, from any source—and it correctly goes into my Downloads folder, with the correct permissions. I can open the PDF fine. It shows in my Downloads folder in Finder. However, when I quit Firefox, the PDF immediately deletes itself. It does not become invisible—I've checked in Terminal—it just deletes itself.
This happens only with PDF files. ZIP files, disk images, other files all remain after quitting Firefox.
Resetting the downloads location has no effect. Removing the Firefox cache at ~/Library/Caches has no effect. Removing all org.mozilla preferences in ~/Library/Preferences has no effect. Reinstalling Firefox 14.0.1 has no effect.
The only clue I could find is that, when I quit Firefox after downloading a PDF (here, called "resume.pdf), fs_usage shows the following:
0:55:46.291 chmod <rw-------> /Users/Justin/Downloads/resume.pdf 0.000044 firefox 20:55:46.292 stat64 /Users/Justin/Downloads/resume.pdf 0.000006 firefox 20:55:46.292 lstat64 /Users/Justin/Downloads/resume.pdf 0.000003 firefox 20:55:46.292 unlink /Users/Justin/Downloads/resume.pdf 0.000100 firefox
None of these lines are logged when quitting Firefox after having downloaded a non-PDF file. It appears that quitting Firefox is triggering chmod to delete the file.
This one boggles my mind. Any ideas?
Wót Justin
Wšykne wótegrona (5)
You can check the browser.helperApps.deleteTempFileOnExit pref on the about:config page.
Thanks for the quick reply, cor-el. I didn't have that entry in my about:config page, so I added it. Unfortunately, after restarting Firefox and downloading a PDF, it still deletes upon quitting Firefox. I looked through the about:config page for other entries that might be relevant, but wasn't able to find anything.
OK, I did some pretty extensive fault isolation here. I still can't figure out *why* it was a problem, but it turns out that the problem was in the prefs.js file at < ~/Library/Application Support/Firefox/Profiles/[Profile]/prefs.js >.
I narrowed it down to the following two lines:
user_pref("browser.privatebrowsing.autostart", true); user_pref("browser.privatebrowsing.dont_prompt_on_enter", true);
I quit Firefox, removed these two lines from the prefs.js file, and restarted Firefox. Now, PDFs are saved in my Downloads folder even after quitting Firefox.
OK. Just narrowed it down even more. It's the line:
user_pref("browser.privatebrowsing.autostart", true);
When I went into the Firefox preferences, went to Privacy, and turned on Never remember history, it inserted that line into my about:config page (and prefs.js file) and now PDFs delete themselves when closing Firefox again.
I see how this could ostensibly be a feature—files downloaded while Private Browsing is enabled are automatically deleted when closing the browser—but why would it only happen with PDFs? Does anyone know if this is a "feature" or a bug? I can't find anything in the most recent release notes, and I don't recall this ever happening before today.
This behavior is not a feature:
"If you save files to your computer while using Private Browsing, they will not be deleted when you stop Private Browsing. However, any files you open in an external application will be cleared from the system's temporary folder, and none of the files you download will appear in the Downloads list."
I think this is a bug.
Wót Justin