Store log and backup files in logs subdirectory#2182
Store log and backup files in logs subdirectory#2182jshrek wants to merge 1 commit intoGnucash:stablefrom
Conversation
jralls
left a comment
There was a problem hiding this comment.
This behavior change must be optional.
This would fix Bug 619119, but the two bugs marked duplicates of that one request that the user be able to specify the log directory. Although not articulated, some might want to specify the backup directory separately. Regardless, the commit message needs to conform to the bug-fix format
Although the DBI/SQL backend doesn't make backup files it does write transaction logs so the log basename change must apply there as well (it's in libgnucash/backend/dbi/gnc-backend-dbi.cpp).
These are C++ files, so please use the C++ string and boost::filesystem functions instead of GLib ones. Note that there are already some standard file-path facilities in libgnucash/core-utils/gnc-filepath-utils. It would be reasonable to add the log and backup directory functions there.
Please don't litter your code with comments that state the obvious.
When opening a .gnucash file, GnuCash creates:
This change creates a "logs" subdirectory beside the main data file and writes the .log and timestamped backup files into that directory (creating it if needed).
The .LCK lock file remains in the same directory as the main .gnucash file (unchanged).