From 1819754598edc2e8b8a7d53dce367fad465ce549 Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Thu, 28 Nov 2019 22:24:05 +0100 Subject: [PATCH] Sync the base configuration directory at the end of meshlink_join(). While joining a mesh, we create a new current/ subdirectory. While the contents were already synced to disk, we need to ensure the subdirectory itself is also synced before returning. --- src/meshlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/meshlink.c b/src/meshlink.c index 57589512..9b30a2a6 100644 --- a/src/meshlink.c +++ b/src/meshlink.c @@ -662,7 +662,7 @@ static bool finalize_join(meshlink_handle_t *mesh, const void *buf, uint16_t len } /* Ensure the configuration directory metadata is on disk */ - if(!config_sync(mesh, "current")) { + if(!config_sync(mesh, "current") || !sync_path(mesh->confbase)) { return false; } -- 2.39.2