repo: Make abort_transaction silently succeed if we're not in a transaction

This helps callers out a lot, and means we can always call abort_transaction
at the end of a function.

https://bugzilla.gnome.org/show_bug.cgi?id=707644
This commit is contained in:
Jasper St. Pierre committed 2013-09-06 20:31:12 -04:00
1 parent ef61724269
commit f84504a8c4
2 files changed
+4 -15

No files matched your search

+3
View File
@@ -662,6 +662,9 @@ ostree_repo_abort_transaction (OstreeRepo *self,
{
gboolean ret = FALSE;
if (!self->in_transaction)
return TRUE;
if (!cleanup_tmpdir (self, cancellable, error))
goto out;