mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Bug #616613: Automatically append the extension if user forgot append them.
Patch by "Bob": The enclosed patch simply tests for a period in the file name, if one exists it leaves it alone, if not, it adds one plus a default extension. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@19429 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
0d9917127f
commit
044873ee08
@ -1406,6 +1406,10 @@ gnc_get_export_filename (SCM choice)
|
||||
|
||||
filepath = gnc_file_dialog (title, NULL, default_dir, GNC_FILE_DIALOG_EXPORT);
|
||||
|
||||
/* Try to test for extension on file name, add if missing */
|
||||
if (g_strrstr(filepath,".") == NULL)
|
||||
filepath = g_strconcat(filepath,".",g_ascii_strdown(type,strlen(type)),NULL);
|
||||
|
||||
g_free (title);
|
||||
g_free (default_dir);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user