From bed57175e663c845091d4472ebb6cdf1fac7fba9 Mon Sep 17 00:00:00 2001 From: Johannes Wendel Date: Thu, 22 Aug 2019 22:13:28 +0200 Subject: [PATCH] adapted filesystem library --- FlippR-Driver/networking/FlippRServer.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/FlippR-Driver/networking/FlippRServer.cpp b/FlippR-Driver/networking/FlippRServer.cpp index 05bc45c..a6a1874 100644 --- a/FlippR-Driver/networking/FlippRServer.cpp +++ b/FlippR-Driver/networking/FlippRServer.cpp @@ -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(); }