gnucash maint: Bug 796759 - --add-price-quotes <sql file> leaves a lock on the file.

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

gnucash maint: Bug 796759 - --add-price-quotes <sql file> leaves a lock on the file.

John Ralls-4
Updated via  https://github.com/Gnucash/gnucash/commit/43af50bd (commit)
        from  https://github.com/Gnucash/gnucash/commit/de927d53 (commit)



commit 43af50bd8aea764eb526b775a63b1df0488eda16
Author: John Ralls <[hidden email]>
Date:   Sat Jul 14 17:09:22 2018 -0700

    Bug 796759 - --add-price-quotes <sql file> leaves a lock on the file.
   
    First, save isn't necessary if the book is dirty, so don't... but that
    means that the book has to be marked dirty after a session swap. No more
    laziness.
   
    Second, regardless of the outcome of inner_main_add_price_quotes the
    session must be destroyed to remove the lock.
   
    A couple of cleanups in QofSessionImpl::save as well: Rewrote the
    descriptive comment to reflect how it really works when the backend has
    gotten disconnected and removed the superfluous qof_book_set_backend
    with the backend that we'd *just gotten from the book*.



Summary of changes:
 gnucash/gnome-utils/gnc-file.c                       |  6 +-----
 gnucash/gnucash-bin.c                                |  9 +++++++--
 .../backend/dbi/test/test-backend-dbi-basic.cpp      |  4 ++++
 libgnucash/engine/qofsession.cpp                     | 20 +++++++++-----------
 libgnucash/engine/test/test-qofsession.cpp           |  1 +
 5 files changed, 22 insertions(+), 18 deletions(-)

_______________________________________________
gnucash-patches mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-patches