adapted filesystem library
This commit is contained in:
@@ -181,8 +181,8 @@ HTTPServer* FlippRServer::build_output_server()
|
||||
{
|
||||
unsigned short port = (unsigned short) config().getInt("FlippRServer.port", this->output_port);
|
||||
|
||||
std::string path = this->create_directory(OUTPUT_SOCKET_NAME);
|
||||
SocketAddress address(path);
|
||||
std::string path = this->create_directory(OUTPUT_SOCKET_NAME);
|
||||
SocketAddress address(path);
|
||||
ServerSocket server_socket(address);
|
||||
|
||||
return new HTTPServer(new OutputRequestHandlerFactory(this->output_driver), server_socket, new HTTPServerParams);
|
||||
@@ -203,12 +203,14 @@ std::string FlippRServer::create_directory(std::string file_name)
|
||||
{
|
||||
std::string runtime_dir = this->get_runtime_dir();
|
||||
|
||||
fs::path path = runtime_dir + file_name;
|
||||
fs::path path = runtime_dir;
|
||||
if(!fs::exists(path))
|
||||
{
|
||||
fs::create_directory(path);
|
||||
}
|
||||
|
||||
path += file_name;
|
||||
|
||||
return path.string();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user