From 76bb2a1ef1fe67fe9d7bb7f26a2e5534231fede2 Mon Sep 17 00:00:00 2001 From: staphen Date: Thu, 25 Aug 2022 17:13:14 -0400 Subject: [PATCH] Don't give up on failure to create parent directory --- src/NodeService.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/NodeService.cpp b/src/NodeService.cpp index 26c1964..2c2bb8a 100644 --- a/src/NodeService.cpp +++ b/src/NodeService.cpp @@ -220,14 +220,15 @@ NodeService::ReasonForTermination NodeService::run() } ptmp.append(*pi); if ((*pi != ".") && (*pi != "..")) { - if (OSUtils::mkdir(ptmp) == false) { - Mutex::Lock _l(_termReason_m); - _termReason = ONE_UNRECOVERABLE_ERROR; - _fatalErrorMessage = "home path could not be created"; - return _termReason; - } + OSUtils::mkdir(ptmp); } } + if (OSUtils::mkdir(ptmp) == false) { + Mutex::Lock _l(_termReason_m); + _termReason = ONE_UNRECOVERABLE_ERROR; + _fatalErrorMessage = "home path could not be created"; + return _termReason; + } } // Set callbacks for ZT Node