Skip to content

WinForms : SaveFileDialog prompts user twice to overwrite an existing file #1293

Description

@philstopford

Expected Behavior

For an existing file targeted by the user with the Save File Dialog, issue a single yes/no message box to determine whether to overwrite the file.

Actual Behavior

Two prompts are shown.

Steps to Reproduce the Problem

  1. Load attached solution into VS 2017
  2. Build and run.
  3. Press 'Click Me' to bring up the Save File dialog. Make a choice here for one of the following:
    3a. Enter a new file name
    OR
    3b. Choose an existing file.
  4. Hit return or confirm on the dialog.
    4a. (For 3a) Do steps 3,3b,4 again so that we're going to overwrite the file you created.
  5. You will get a prompt (yes/no) to overwrite the existing file. Answer 'yes'.
  6. You will get a second prompt to overwrite the file. This is unexpected.

The double prompt happens even if CheckFileExists is set to false. Using the Open File Dialog to pass the filename to the writer doesn't yield the same warning (naturally). WPF does not appear to be affected.

Code that Demonstrates the Problem

eto_saveFileDialog.zip

Specifications

  • Version: 2.4.1 and current pre-release code.
  • Platform(s): WinForms
  • Operating System(s): Windows 10

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions