[f-spot] Don't BeginTransaction if it shouldn't and won't be committed
- From: Ruben Vermeersch <rubenv src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [f-spot] Don't BeginTransaction if it shouldn't and won't be committed
- Date: Mon, 2 Aug 2010 13:41:22 +0000 (UTC)
commit c69c0442adbb4ae91a38dbc652ea4a5841956797
Author: Paul Wellner Bou <paul purecodes org>
Date: Wed Jul 28 14:30:38 2010 +0200
Don't BeginTransaction if it shouldn't and won't be committed
https://bugzilla.gnome.org/show_bug.cgi?id=625336
src/TagStore.cs | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/src/TagStore.cs b/src/TagStore.cs
index c6325ff..84c9f4d 100644
--- a/src/TagStore.cs
+++ b/src/TagStore.cs
@@ -358,10 +358,13 @@ public class TagStore : DbStore<Tag> {
// FIXME: this hack is used, because HyenaSqliteConnection does not support
// the InTransaction propery
- try {
- Database.BeginTransaction ();
- } catch {
- use_transactions = false;
+
+ if (use_transactions) {
+ try {
+ Database.BeginTransaction ();
+ } catch {
+ use_transactions = false;
+ }
}
foreach (Tag tag in tags) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]