From: Michael Tremer Date: Sun, 13 Oct 2024 13:47:43 +0000 (+0000) Subject: snapshots: Destroy directories after umount X-Git-Tag: 0.9.30~1037 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5b0d73cb41165b1862f0161890fc5a6d3686ae8d;p=pakfire.git snapshots: Destroy directories after umount Signed-off-by: Michael Tremer --- diff --git a/src/libpakfire/snapshot.c b/src/libpakfire/snapshot.c index 2be0f54cb..6b13ed26f 100644 --- a/src/libpakfire/snapshot.c +++ b/src/libpakfire/snapshot.c @@ -334,6 +334,10 @@ int pakfire_snapshot_umount(struct pakfire_snapshot* snapshot) { r = umount(snapshot->overlayfs.path); if (r < 0) return r; + + r = pakfire_rmtree(snapshot->overlayfs.path, 0); + if (r < 0) + return r; } // Umount the tmpfs @@ -341,6 +345,10 @@ int pakfire_snapshot_umount(struct pakfire_snapshot* snapshot) { r = umount(snapshot->tmpfs.path); if (r < 0) return r; + + r = pakfire_rmtree(snapshot->tmpfs.path, 0); + if (r < 0) + return r; } return 0;