Browse Source

Don't give up on failure to create parent directory

pull/11/head
staphen 4 years ago committed by Anders Jenbo
parent
commit
76bb2a1ef1
  1. 13
      src/NodeService.cpp

13
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

Loading…
Cancel
Save