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);
|
unsigned short port = (unsigned short) config().getInt("FlippRServer.port", this->output_port);
|
||||||
|
|
||||||
std::string path = this->create_directory(OUTPUT_SOCKET_NAME);
|
std::string path = this->create_directory(OUTPUT_SOCKET_NAME);
|
||||||
SocketAddress address(path);
|
SocketAddress address(path);
|
||||||
ServerSocket server_socket(address);
|
ServerSocket server_socket(address);
|
||||||
|
|
||||||
return new HTTPServer(new OutputRequestHandlerFactory(this->output_driver), server_socket, new HTTPServerParams);
|
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();
|
std::string runtime_dir = this->get_runtime_dir();
|
||||||
|
|
||||||
fs::path path = runtime_dir + file_name;
|
fs::path path = runtime_dir;
|
||||||
if(!fs::exists(path))
|
if(!fs::exists(path))
|
||||||
{
|
{
|
||||||
fs::create_directory(path);
|
fs::create_directory(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
path += file_name;
|
||||||
|
|
||||||
return path.string();
|
return path.string();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user