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

Selecting *.* on windows causes it to use the last file format instead #101

Open
matcool opened this issue Sep 9, 2021 · 1 comment
Open

Comments

@matcool
Copy link

matcool commented Sep 9, 2021

Compilation Environment

  • OS: Windows 10
  • Compiler: MSVC 2019
  • Build directory used: cmake
  • Have I attempted to reproduce the problem on the devel branch? Yes

Describe the bug

nfdchar_t* path = nullptr;
auto result = NFD_SaveDialog("mp4;mkv;webm", nullptr, &path);
if (result == NFD_OKAY) {
    std::cout << "Selected path is: " << path << std::endl;
    free(path);
}

This will create a file dialog with 4 options, *.mp4, *.mkv, *.webm and *.*
The first three work fine, however, picking *.* will append .webm to the path instead of not appending anything

@btzy
Copy link

btzy commented Oct 5, 2021

This change to nativefiledialog-extended fixes a similar bug for me, so I think you'd just need to call SetDefaultExtension(L"") if you don't want it to append a default extension.

However, I think on Windows users expect some extension to be appended to any file (at least that seems to be the case for the programs I have on my Windows machine), so in my opinion the proper behaviour should be to append a default extension.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants