8000 fix: honor user-defined Downloads directory by codebytere · Pull Request #29938 · electron/electron · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix: honor user-defined Downloads directory #29938

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 30, 2021
Merged

Conversation

codebytere
Copy link
Member

Description of Change

Closes #29909.

Makes it such that ElectronBrowserClient::GetDefaultDownloadDirectory() honors user-defined Downloads directories by calling out to platform-specific download logic defined in Chromium

Checklist

Release Notes

Notes: Fixes an issue where Electron would sometimes not honor the user-defined Downloads directory.

@codebytere codebytere requested review from nornagon and zcbenz June 29, 2021 12:07
@electron-cation electron-cation bot added the new-pr 🌱 PR opened recently label Jun 29, 2021
@codebytere codebytere added semver/patch backwards-compatible bug fixes target/13-x-y labels Jun 29, 2021
Copy link
Contributor
@nornagon nornagon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test? 😇

@codebytere
Copy link
Member Author

@nornagon what would you envision for a test here? Our session downloader shows a dialog if a user doesn't explicitly set the save path, and all calls to GetDefaultDownloadDirectory originate from Chromium so i'm not sure how to explicitly trigger that codepath via test 🤔

@codebytere codebytere force-pushed the honor-download-paths branch from 58f69e4 to 6f6aa90 Compare June 30, 2021 09:59
@electron-cation electron-cation bot removed the new-pr 🌱 PR opened recently label Jun 30, 2021
@nornagon
Copy link
Contributor

Ah, okay, I wasn't sure if there was a way to interrogate this value without user interaction. There's app.getPath('downloads') but it seems like that doesn't go through the same code path.

@codebytere
Copy link
Member Author

Unrelated failure.

@codebytere codebytere merged commit 98809d8 into main Jun 30, 2021
@codebytere codebytere deleted the honor-download-paths branch June 30, 2021 20:54
@release-clerk
Copy link
release-clerk bot commented Jun 30, 2021

Release Notes Persisted

Fixes an issue where Electron would sometimes not honor the user-defined Downloads directory.

@trop
Copy link
Contributor
trop bot commented Jun 30, 2021

I have automatically backported this PR to "12-x-y", please check out #29966

@trop
Copy link
Contributor
trop bot commented Jun 30, 2021

I have automatically backported this PR to "14-x-y", please check out #29967

@trop
Copy link
Contributor
trop bot commented 8000 Jun 30, 2021

I have automatically backported this PR to "13-x-y", please check out #29968

BlackHole1 pushed a commit to BlackHole1/electron that referenced this pull request Aug 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver/patch backwards-compatible bug fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: GetDefaultDownloadDirectory doesn't honour the user-defined Downloads directory
2 participants
0