After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 616613 - Automatically append the extension if user forgot append them.
Automatically append the extension if user forgot append them.
Status: RESOLVED FIXED
Product: GnuCash
Classification: Other
Component: User Interface General
git-master
Other Windows
: Normal enhancement
: ---
Assigned To: David Hampton
Chris Shoemaker
Depends on:
Blocks:
 
 
Reported: 2010-04-23 08:43 UTC by Tao Wang
Modified: 2018-06-29 22:38 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add extension to export files (1.41 KB, patch)
2010-08-02 15:45 UTC, Bob
needs-work Details | Review
Report only patch (756 bytes, patch)
2010-08-13 21:20 UTC, Bob
committed Details | Review

Description Tao Wang 2010-04-23 08:43:11 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.
Comment 1 Bob 2010-07-18 18:42:52 UTC
I believe this is fixed as the files now have gnucash as the extension, tested with revision 19375.
Comment 2 Tao Wang 2010-07-18 23:55:25 UTC
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.
Comment 3 Bob 2010-07-21 14:23:05 UTC
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.
Comment 4 Bob 2010-07-25 15:30:58 UTC
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.
Comment 5 Bob 2010-08-02 15:45:00 UTC
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 6 Christian Stimming 2010-08-13 09:35:46 UTC
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.
Comment 7 Bob 2010-08-13 21:20:26 UTC
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 8 Christian Stimming 2010-08-14 20:48:24 UTC
Comment on attachment 167845 [details] [review]
Report only patch

r19429
Comment 9 Christian Stimming 2010-08-14 20:49:14 UTC
Thanks a lot!
Comment 10 John Ralls 2018-06-29 22:38:24 UTC
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.