sindresorhus / electron-dl

Simplified file downloads for your Electron app
MIT License
1.16k stars 137 forks source link

Fix ignored filename when using `saveAs` option #129

Closed bolivir closed 3 years ago

bolivir commented 3 years ago

The current implementation ignores the filename when using the option saveAs. This PR will fix the above issue and will set the saveDialogOptions default path to the file path given.

Referenced issues: Fixes #59 Fixes #79

sindresorhus commented 3 years ago

Does this fix any existing issue? if so, it should be referenced.

bolivir commented 3 years ago

@sindresorhus added the issue(s) i could find in the issue tracker.

sindresorhus commented 3 years ago

Did you test this change manually to ensure it actually works and that it fixes the problem?

bolivir commented 3 years ago

Did you test this change manually to ensure it actually works and that it fixes the problem?

The original commit(with negated condition) i tested manually and ensured it used the provided filename. The last change of the if invert i did not test.