Do not create pidfile and portfile directories on windows
This commit is contained in:
parent
f219bf6320
commit
14e450f7b5
1 changed files with 10 additions and 8 deletions
|
@ -243,6 +243,15 @@ int main(int argc, char **argv)
|
|||
return 1;
|
||||
}
|
||||
|
||||
// create directories
|
||||
try {
|
||||
boost::filesystem::create_directories(CONFIG_STRING(&config, "service.working_dir"));
|
||||
}
|
||||
catch (...) {
|
||||
std::cerr << "Can't create service.working_dir directory " << CONFIG_STRING(&config, "service.working_dir") << ".\n";
|
||||
return 1;
|
||||
}
|
||||
#ifndef WIN32
|
||||
// create directories
|
||||
try {
|
||||
boost::filesystem::create_directories(
|
||||
|
@ -254,14 +263,6 @@ int main(int argc, char **argv)
|
|||
return 1;
|
||||
}
|
||||
// create directories
|
||||
try {
|
||||
boost::filesystem::create_directories(CONFIG_STRING(&config, "service.working_dir"));
|
||||
}
|
||||
catch (...) {
|
||||
std::cerr << "Can't create service.working_dir directory " << CONFIG_STRING(&config, "service.working_dir") << ".\n";
|
||||
return 1;
|
||||
}
|
||||
// create directories
|
||||
try {
|
||||
boost::filesystem::create_directories(
|
||||
boost::filesystem::path(CONFIG_STRING(&config, "service.portfile")).parent_path().string()
|
||||
|
@ -271,6 +272,7 @@ int main(int argc, char **argv)
|
|||
std::cerr << "Can't create service.portfile directory " << CONFIG_STRING(&config, "service.portfile") << ".\n";
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef WIN32
|
||||
SetCurrentDirectory( utf8ToUtf16(CONFIG_STRING(&config, "service.working_dir")).c_str() );
|
||||
|
|
Loading…
Add table
Reference in a new issue