From: Michael Tremer Date: Fri, 18 Oct 2024 15:18:46 +0000 (+0000) Subject: snapshots: Automatically create a new snapshot if there are none X-Git-Tag: 0.9.30~1008 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=919d74038d7c22e175bd9fa0558b7bf25ea0c722;p=pakfire.git snapshots: Automatically create a new snapshot if there are none Signed-off-by: Michael Tremer --- diff --git a/src/libpakfire/snapshot.c b/src/libpakfire/snapshot.c index 0aef6cfc3..cdd12210a 100644 --- a/src/libpakfire/snapshot.c +++ b/src/libpakfire/snapshot.c @@ -178,9 +178,13 @@ int pakfire_snapshot_find(struct pakfire_snapshot** snapshot, struct pakfire* pa r = num_paths; goto ERROR; - // We are done if we did not find anything + // Create a new snapshot if none was found } else if (num_paths == 0) { - r = 0; + r = pakfire_snapshot_make(snapshot, pakfire); + if (r < 0) + goto ERROR; + + // Anyways, we are done goto ERROR; }