Skip to content

Commit

Permalink
Bug 798948 - XML file corrupted by saving twice in extremely short pe…
Browse files Browse the repository at this point in the history
…riod

Prevent reentrance with gnc_file_save_in_progress().
  • Loading branch information
jralls committed Jun 13, 2023
1 parent 75fb523 commit 38118a2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions gnucash/gnome/gnc-plugin-basic-commands.c
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,8 @@ gnc_main_window_cmd_file_save (GSimpleAction *simple,

g_return_if_fail (data != NULL);

if (!gnc_main_window_all_finish_pending ())
if (!gnc_main_window_all_finish_pending () ||
gnc_file_save_in_progress())
return;

gnc_window_set_progressbar_window (GNC_WINDOW(data->window));
Expand All @@ -398,7 +399,8 @@ gnc_main_window_cmd_file_save_as (GSimpleAction *simple,

g_return_if_fail (data != NULL);

if (!gnc_main_window_all_finish_pending ())
if (!gnc_main_window_all_finish_pending () ||
gnc_file_save_in_progress())
return;

gnc_window_set_progressbar_window (GNC_WINDOW(data->window));
Expand Down

0 comments on commit 38118a2

Please sign in to comment.