From: Guus Sliepen Date: Thu, 28 Nov 2019 21:24:05 +0000 (+0100) Subject: Sync the base configuration directory at the end of meshlink_join(). X-Git-Url: https://git.meshlink.io/?a=commitdiff_plain;h=1819754598edc2e8b8a7d53dce367fad465ce549;p=meshlink 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. --- 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; }