Generalize unlink to OS-dep code in Utils, just a little prep for Windows port.

This commit is contained in:
Adam Ierymenko 2013-08-08 10:06:39 -04:00
parent 8a46452a70
commit 86056fdbd9
3 changed files with 33 additions and 6 deletions

View file

@ -339,8 +339,8 @@ Node::ReasonForTermination Node::run()
Utils::lockDownFile(identitySecretPath.c_str(),false);
// Clean up some obsolete files if present -- this will be removed later
unlink((_r->homePath + ZT_PATH_SEPARATOR_S + "status").c_str());
unlink((_r->homePath + ZT_PATH_SEPARATOR_S + "thisdeviceismine").c_str());
Utils::rm((_r->homePath + ZT_PATH_SEPARATOR_S + "status"));
Utils::rm((_r->homePath + ZT_PATH_SEPARATOR_S + "thisdeviceismine"));
// Make sure networks.d exists
mkdir((_r->homePath + ZT_PATH_SEPARATOR_S + "networks.d").c_str(),0700);