GNOME Bugzilla – Bug 616613
Automatically append the extension if user forgot append them.
Last modified: 2018-06-29 22:38:24 UTC
It's annoy to add the extension later if the extension is forgoten. File may looks missing, when folder is organized by sort by file type. I think it's not diffcult to do that. GnuCash should automatically append the extension, such ".html", to the filename, if user forgot append them.
I believe this is fixed as the files now have gnucash as the extension, tested with revision 19375.
There are 3 kind of save/export in GnuCash: 1) Save the data (xml/sqlite/mysql/pgsql) 2) Export the account list 3) Export the report (.html) The first one has been fixed (with .gnucash extension), however, the last two haven't been fixed.
Sorry about that, slightly confused, but now I am more confused. I have been able to sort out the report export but the account list does not work on my linux box 2.3.14, r19232, I just end up with a 0 byte file. I have an old windows version based on 2.2.9, r17949 and this shows to options for accounts, 'Export Accounts' and 'Export Chart of Accounts for QSF' and both seem to work. I also have windows version 2.3.14, r19291 and this just shows the one option 'Export Accounts' but I still end up with 0 byte file. Can you advise which version you have, what export options and whether they result in a valid file.
After some poking around, the QSF option was removed in r19099 so that explains that. I have subsequently realized that if you export accounts to a new file you get a file with 0 bytes. If you do it again and use the same file name, you get a prompt asking to over write file and then you have a file with data. This seems to of not worked since at least r18618, the last one I tried on Windows. Will give some thought using latest release.
Created attachment 166989 [details] [review] Add extension to export files With regards to the 0 byte file, see bug 625845. 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, .html for reports and .gnucash for accounts.
Comment on attachment 166989 [details] [review] Add extension to export files The part for gnc-plugin-page-report.c is fine. In the gnc-file.c part, can you please make the "gnucash" string constant a #define or even better a variable that is defined somewhere only once? Thanks.
Created attachment 167845 [details] [review] Report only patch I think I failed to update the patch on the last update. This patch is only concerned with the report extension as the account export extension has been fixed by the above bug.
Comment on attachment 167845 [details] [review] Report only patch r19429
Thanks a lot!
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=616613. Please update any external references or bookmarks.