From 40a7406097c0b5b0670c5987f6fe8c902d65562d Mon Sep 17 00:00:00 2001 From: Deepak Kodihalli Date: Mon, 14 Jan 2019 03:34:35 -0600 Subject: Fix regression with e165ea9 Commit e165ea9 introduces creation of the remote logging config file on demand, but it presumed the directory housing this config file pre-exists. That was not the case. Change-Id: I8974ce798de5d2747bcc4a67209f4d2c8081cfe6 Signed-off-by: Deepak Kodihalli --- phosphor-rsyslog-config/server-conf.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/phosphor-rsyslog-config/server-conf.cpp b/phosphor-rsyslog-config/server-conf.cpp index e8da82e..16955fc 100644 --- a/phosphor-rsyslog-config/server-conf.cpp +++ b/phosphor-rsyslog-config/server-conf.cpp @@ -108,6 +108,7 @@ uint16_t Server::port(uint16_t value) void Server::writeConfig(const std::string& serverAddress, uint16_t serverPort, const char* filePath) { + fs::create_directory(fs::path(filePath).parent_path()); std::fstream stream(filePath, std::fstream::out); if (serverPort && !serverAddress.empty()) -- cgit v1.2.1