Skip to content

Commit

Permalink
fix: reverse saveDialog cancellation bool (#18383)
Browse files Browse the repository at this point in the history
  • Loading branch information
trop[bot] authored and ckerr committed May 21, 2019
1 parent 043838f commit 84b762f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions atom/browser/ui/file_dialog_win.cc
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ void RunSaveDialogInNewThread(const RunState& run_state,
bool result = ShowSaveDialogSync(settings, &path);
run_state.ui_task_runner->PostTask(
FROM_HERE,
base::BindOnce(&OnSaveDialogDone, std::move(promise), result, path));
base::BindOnce(&OnSaveDialogDone, std::move(promise), !result, path));
run_state.ui_task_runner->DeleteSoon(FROM_HERE, run_state.dialog_thread);
}

Expand Down Expand Up @@ -320,7 +320,7 @@ void ShowSaveDialog(const DialogSettings& settings,
RunState run_state;
if (!CreateDialogThread(&run_state)) {
mate::Dictionary dict = mate::Dictionary::CreateEmpty(promise.isolate());
dict.Set("canceled", false);
dict.Set("canceled", true);
dict.Set("filePath", base::FilePath());
promise.Resolve(dict.GetHandle());
} else {
Expand Down

0 comments on commit 84b762f

Please sign in to comment.