gnucash maint: Bug 755920 - Crash (Freeze) when using File Save As.. in Windows OS
geert.gnucash at kobaltwit.be
Sat Oct 3 07:05:43 EDT 2015
On Friday 02 October 2015 12:33:20 John Ralls wrote:
> > 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 ?
> 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()
> I’ll fix that now. Thanks for noticing.
More information about the gnucash-devel