Closed Bug 1710933 Opened 3 years ago Closed 3 years ago

LaunchWithApplication download should be moved to the "Downloads" folder when finished

Categories

(Firefox :: Downloads Panel, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
91 Branch
Tracking Status
firefox91 --- fixed

People

(Reporter: mtigley, Assigned: ava8katushka)

References

Details

Attachments

(1 file)

Currently, a download through LaunchWithApplication ("Open with Foo application") is initially created in the temp directory and is removed when the last session is closed.

We want to change it so that when the download is finished, it's moved to the "Downloads" folder (and is not deleted when the last session closes).

Edit: It's not clear why the downloaded file needs to saved to the /temp directory first and then moved to the Downloads folder. Instead, this issue will save launched-with-app downloads directly to the Downloads folder.

Severity: -- → S3
Priority: -- → P3
Summary: LaunchWithApplication download should be moved to the Download → LaunchWithApplication download should be moved to the "Downloads" folder when finished
Assignee: nobody → ava8katushka
Status: NEW → ASSIGNED
Blocks: 1714107

Hi, Micah/Ava.

I know you're not working strictly in this but: could it be possible to review the current behavior of saving downloaded files to a /tmp folder before moving it to Downloads, and change that to save to Downloads directly? There have been lots of bugs filled about the current behavior (see Downloads are stored in $TMPDIR|$TMP|$TEMP|/tmp first and then moved to the selected path only after the download finishes / location is selected (closed) and Change nsSpecialSystemDirectory::operator=(OS_TemporaryDirectory) to violate FHS (open)).

As an Ubuntu (Linux) user I'm constantly seing warnings about programs not being able to open /tmp files because of permissions restrictions. For example, you can't use LibreOffice snap (an Ubuntu containareizad-app format) to open a file choosing the "Open with" option because it will always fail (there has been a debate about this here: Sharing files via /tmp).

(In reply to Santiago Fernández Núñez from comment #2)

could it be possible to review the current behavior of saving downloaded files to a /tmp folder before moving it to Downloads, and change that to save to Downloads directly?

The work Ava has done in https://phabricator.services.mozilla.com/D115997 actually makes it so downloaded files are directly saved to the Downloads folder when the pref browser.download.improvements_to_download_panel is enabled .
There wasn't a clear reason why it needs to be saved to the temporary directory and then moved to Downloads, which was briefly brought up here. I'll need to update the original comment to clarify this.

(In reply to Micah Tigley [:mtigley] from comment #3)

Great to hear this, I wasn't aware of this job! Thanks!

Pushed by mtigley@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/dafe8426eac5
Save LaunchWithApplication downloads into downloads folder for windows and unix r=mtigley
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 91 Branch

Do I understand correctly that if I want to view the file without saving it to my system (possibly from private browsing mode), I'll need to save it into the temporary directory and then open manually? I'd say that for the private browsing mode this is a footgun.

(In reply to Denis Lisov from comment #7)

Do I understand correctly that if I want to view the file without saving it to my system (possibly from private browsing mode), I'll need to save it into the temporary directory and then open manually? I'd say that for the private browsing mode this is a footgun.

If the issue is that you want files to be cleaned up after a non-private browsing session is closed then yes you'd need to do that. But for private browsing mode, files are always scheduled to be deleted at the end of the session regardless of the pref.

Will this behavior be configurable? The current behavior is vastly preferable, possibly to many people.

Please make it configurable. I don't need my downloads directory cluttered by single-use files.

Hi here,
I second on the configurable approach.
The existing behavior works pretty well.
User should have both options, one for viewing the downloaded file (without direct/permanent save) and one for Saving it.

Also if you plan on changing this, do you have some metrics that can give figures on how many users like and do not like the existing approach?

(In reply to Micah [:mtigley] (she/her) from comment #8)

(In reply to Denis Lisov from comment #7)

Do I understand correctly that if I want to view the file without saving it to my system (possibly from private browsing mode), I'll need to save it into the temporary directory and then open manually? I'd say that for the private browsing mode this is a footgun.

If the issue is that you want files to be cleaned up after a non-private browsing session is closed then yes you'd need to do that. But for private browsing mode, files are always scheduled to be deleted at the end of the session regardless of the pref.

But within the session, if files are stored on disk in the Downloads folder, they are opened for reading to a lot of people. Usually, the /tmp folder is mounted in RAM, so it's vastly more secure.

Plus, this behavior should be configurable. I don't have time to clean my Downloads folder of the whole crap I download just to open it with Evince.

If i open file - i expect it will be saved in temp and removed automatically.
If i download file - i expect it will be saved in downloads, and i control its availability.

If i open, as for example, airplane ticket in pdf i dont expect it will be saved in Downloads.
Now, anyone who open Downloads folder would see my ticket.

Same with personal documents etc.
I consider it as a serious privacy problem.

Wrong, confusing behavior, there is no need to fix anything.

There's another problematic case. If a user has little disk space (for example, only a small SSD), they may want to open a big file from the network every time instead of keeping it locally to save space. This change would cause them to download the file every time instead, consuming lots of disk space.

Restrict Comments: true
Regressions: 1737926
Regressions: CVE-2022-26386
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: