Browse Source

Don't give up on failure to create parent directory

pull/9/head
staphen 4 years ago
parent
commit
b9bca8298f
No known key found for this signature in database
GPG Key ID: E6D757EEF0CE235F
  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