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

Overwrite prompt in save dialog does not append file extension first #52

Closed
btzy opened this issue Aug 8, 2018 · 1 comment
Closed

Comments

@btzy
Copy link

btzy commented Aug 8, 2018

This bug happens on Windows at least (I'm not sure about other platforms).

To reproduce this bug:

  1. Create a test application that does NFD_SaveDialog( "txt", NULL, &outPath );, and then writes some data to the file returned in outPath.
  2. Create a file called test.txt (using Windows Explorer).
  3. Run the test application and type test (without the extension) into the dialog text box.
  4. Observe that there is no prompt that asks if we want to overwrite the existing file, but the file gets overwritten anyway.

Notice that if we had typed test.txt into the dialog text box, we would get the overwrite prompt.

This is unexpected behaviour (at least on Windows, in which I am familiar with) because other Windows applications will append the file extension before checking if an existing file will be overwritten (and due to this expected behaviour, Windows users tend to leave out the file extension when typing a file name in the save file dialog).

@btzy
Copy link
Author

btzy commented Aug 12, 2018

Sorry, this is not a bug with Native File Dialog. It was an issue with my calling code that has this behaviour.

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

1 participant