agendafs

A filesystem for your calendar.

git clone git://mccd.space/agendafs
commit 3a171b4ea68f1d091d61a1eec55c2123e9a55f40
parent 9f362615d8f52b47cd09f7f309c720ed963e516a
Author: Marc Coquand <marc@coquand.email>
Date:   Wed, 20 Aug 2025 16:57:34 +0200

fix: Correctly remove categories when replacing

They weren't being set correctly.

Diffstat:
Mfuse_node.c | 6++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/fuse_node.c b/fuse_node.c
@@ -477,11 +477,9 @@ set_node_categories(memory_region *mreg, const struct tree_node *node,
 	    icalcomponent_get_first_property(inner, ICAL_CATEGORIES_PROPERTY);
 
 	// Delete old categories
-	while (catp) {
+	while ((catp = icalcomponent_get_first_property(
+		    inner, ICAL_CATEGORIES_PROPERTY)) != NULL) {
 		icalcomponent_remove_property(inner, catp);
-
-		catp = icalcomponent_get_next_property(
-		    inner, ICAL_CATEGORIES_PROPERTY);
 	}
 
 	if (s == 0) {