summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--litterbox.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/litterbox.c b/litterbox.c
index 8015cec..39fce8f 100644
--- a/litterbox.c
+++ b/litterbox.c
@@ -368,9 +368,13 @@ static void handle(struct Message msg) {
 	if (!msg.cmd) return;
 	for (size_t i = 0; i < ARRAY_LEN(Handlers); ++i) {
 		if (strcmp(msg.cmd, Handlers[i].cmd)) continue;
-		dbExec(db, SQL(BEGIN TRANSACTION;));
-		Handlers[i].fn(&msg);
-		dbExec(db, SQL(COMMIT TRANSACTION;));
+		if (Handlers[i].transaction) {
+			dbExec(db, SQL(BEGIN TRANSACTION;));
+			Handlers[i].fn(&msg);
+			dbExec(db, SQL(COMMIT TRANSACTION;));
+		} else {
+			Handlers[i].fn(&msg);
+		}
 		break;
 	}
 }
2024-09-13Add photos from September 2June McEnroe 2024-09-13Add Fomapan 200 to films listJune McEnroe 2024-09-10Add August 29 picnic photosJune McEnroe 2024-09-08Apply some bold to trips renderingJune McEnroe 2024-09-08Render trips hopefully more efficientlyJune McEnroe 2024-09-08Allow removing bodies and lensesJune McEnroe 2024-09-08Limit body width so it looks less silly on desktopJune McEnroe 2024-09-07Handle no film being loadedJune McEnroe 2024-09-07Fancy up the text a littleJune McEnroe