diff mbox series

[BlueZ,2/2] tools: print error on mkdir

Message ID 20250204101612.66823-3-pmontes@shsconsultores.es
State New
Headers show
Series Fix Ubuntu 24.04 build error | expand

Commit Message

Pablo Montes Feb. 4, 2025, 10:16 a.m. UTC
On some fresh installations where XDG_CONFIG_SESSION is not defined, and $HOME/.config is not created yet, mesh-cfgclient failed with no hints
---
 tools/mesh-cfgclient.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/tools/mesh-cfgclient.c b/tools/mesh-cfgclient.c
index 3bd2b673a..b1d091be7 100644
--- a/tools/mesh-cfgclient.c
+++ b/tools/mesh-cfgclient.c
@@ -2529,8 +2529,10 @@  static bool setup_cfg_storage(void)
 				return false;
 			}
 		} else if (errno == ENOENT) {
-			if (mkdir(mesh_dir, 0700) != 0)
+			if (mkdir(mesh_dir, 0700) != 0) {
+				l_error("Cannot create %s", mesh_dir);
 				return false;
+			}
 		} else {
 			perror("Cannot open config directory");
 			return false;