gnucash maint: Bug 755920 - Crash (Freeze) when using File Save As.. in Windows OS

John Ralls jralls at ceridwen.us
Fri Oct 2 15:33:20 EDT 2015


> On Oct 2, 2015, at 9:43 AM, Geert Janssens <geert.gnucash at kobaltwit.be> wrote:
> 
> Thanks for the quick fix John.
> 
> A remark that's completely unrelated to this particular bug, but triggered because it happened 
> in this part of the code:
> 
> It occurs to me that check_file_path as function name is not totally congruent with what the 
> function does - or better, only covers part of what it does.
> 
> The current function does two things:
> 1. save the chosen path as default path for future save actions
> 2. prevent users from accidentally saving their data file in (a subdirectory of) the dotgnucash 
> path.
> 
> For starters it would make sense to me to do both actions in reverse order. That is if the user 
> tries to save to (a subdirectory of) the dotgnucash path, we prevent this AND shouldn't store 
> the user chosen path as the last used one or should we ?
> 
> Secondly for the double role vs the function name, can we come up with a name that better 
> covers this ? Or is it better to split up the function in two smaller ones ?

Geert,

Actually the gnc_set_default_directory() should be removed from check_file_path; I’d done that, moving it to after the call to check_file_path() in gnc_file_do_save_as and gnc_file_do_export along with a way of running the loop that didn’t work. When I reverted the hunk to try again I forgot to remove that gnc_set_default_directory() call.

I’ll fix that now. Thanks for noticing.

Regards,
John Ralls




More information about the gnucash-devel mailing list