Skip to content
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

[Bug]: Inconsistent behaviour in save dialog when Windows has file extensions hidden #41704

Open
3 tasks done
wartab opened this issue Mar 26, 2024 · 1 comment
Open
3 tasks done

Comments

@wartab
Copy link

wartab commented Mar 26, 2024

Preflight Checklist

Electron Version

29.1.5

What operating system are you using?

Windows

Operating System Version

Windows 10

What arch are you using?

x64

Last Known Working Electron version

never

Expected Behavior

On Windows, when file extensions are hidden, when the user changes the filename, the original extension should be added back. This is the default behaviour when using the browser save dialog.

Actual Behavior

The file extension is removed when the user hasn't typed an extension.

Note that, sometimes, this even happens when the user hasn't changed the file name at all.

Testcase Gist URL

https://gist.github.com/db79d1744481ab377ea8c0904d5e1633

Additional Information

In this Gist, when you click Browser Download, first of all, the save dialog auto-detects the type from system settings:
5bece578036c12a4e5e412032d2999d9

Changing the name to "i-wanted-another-name":
82407b4e78fe32e76e997b4628571f31

it'll automatically add back .csv
f8908e4a0fec3b1610a2e1b9596c8280

While with the Electron dialog, we get this (when defaulting to some-file.csv):
9f01f45186cf9166dc9db8dd1b901fb4

Changing the name does this:
6ea53d3f1e07eb84de21b0cf5bb820a0

{
canceled: false,
filePath: 'C:\\Users\\Vincent\\Downloads\\i-wanted-some-other-name'
}
@MafistoPL
Copy link

Isn't it duplicate of 38794?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 👍 Does Not Block Stable
Status: 👍 Does Not Block Stable
Development

No branches or pull requests

3 participants