Open Bug 1278811 Opened 4 years ago Updated 3 months ago

Firefox in Private Browsing Mode deletes downloaded files upon exit


(Firefox :: Private Browsing, defect, P5)

47 Branch





(Reporter: laurens, Unassigned)


(Blocks 1 open bug)


User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:47.0) Gecko/20100101 Firefox/47.0
Build ID: 20160604131506

Steps to reproduce:

Turn off: Remember browser and download history
Search for PDF online, click and open in PDF program and close.
Close Firefox

Actual results:

The PDF is deleted from /Downloads directory

Expected results:

Don't delete downloaded PDFs (the history should be deleted, but not the files!)
Or at least improve the UI in Preferences to show the user that DL History and DL files are deleted!
Does it happen with a fresh profile?
Component: Untriaged → Download Manager
Flags: needinfo?(laurens)
Product: Firefox → Toolkit
In addition, where is located the /Downloads directory? On local drive? USB drive? Network drive?
/Downloads is default OS X 

New profile
Settings -> Applications: PDF Always ask
Privacy -> Use custom:
Check: Always use private
Check: Accept 3rd party from visited

Google for a PDF file. 
Click, open in Preview (OS X PDF viewer). 
Close Preview
Close Firefox
Firefox deletes tge PDF from /Downloads on exit

Expected: Firefox does not delete files (PDF) from /Downloads on exit in Private mode *OR* gives user explicit information that private mode will remove files from /Downloads on exit (to me there is a difference between private: don't keep cookies and all the website tracking) and delete the files that I clicked on) - but maybe this is just me that has a different understanding?
In that case a UI matrix to show what the various privacy options do / do not do may make things clearer?
Ok, it's in PB mode.
Summary: Firefox deletes downloaded files upon exit → Firefox in Private Mode deletes downloaded files upon exit
Good point - maybe it's expected behaviour - though in that case is this the difference between PB mode and custom with delete on exit turned on for everything?
In that case maybe have a PB mode checkbox that checks all the privacy options (and shows explicit: delete downloaded files on exit)?
Component: Download Manager → Private Browsing
Product: Toolkit → Firefox
Summary: Firefox in Private Mode deletes downloaded files upon exit → Firefox in Private Browsing Mode deletes downloaded files upon exit
Flags: needinfo?(laurens)
It also happened to me a few times, last time i downloaded a .zip file.
But unfortunately i cannot reproduce it, my Downloads folder is D:\ drive.

Name: Firefox
Version: 45.2.0
Build ID: 20160601155443
Update Channel: esr
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0
Marking P5: would accept a patch that gives user explicit information that private mode will remove downloaded files on exit. However note that not ALL files are deleted? A PDF file was deleted, but an .xpi file was not?
Priority: -- → P5
Blocks: 1297533
See Also: → 1297533

I can confirm this bug as well. Upon exit, files that I downloaded during the session were deleted from my Downloads folder. All other files in the Downloads folder remained untouched. I've only encountered this bug 3 or 4 times. It seems to typically happen unpredictably so I have no clue how to reproduce it. It's very rare, but since I only use private browsing mode, I probably hit this bug more often than others.

It may also be worth mentioning that this is not always limited to deleting a single file - I've had multiple files deleted upon exit that were downloaded in a single session. I also have had .mkv files deleted, so this is not limited to just PDF or zip files. I suspect that the file type may be irrelevant.

I've also had this occur 2 times in a row. I downloaded some files, closed the session, and then saw that the files were deleted. I then reopened the browser, re-downloaded the files, closed the browser, and saw that they were deleted again! This leads me to believe that this is not entirely random.

You need to log in before you can comment on or make changes to this bug.