summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDeepak Kodihalli <dkodihal@in.ibm.com>2019-01-14 03:34:35 -0600
committerDeepak Kodihalli <dkodihal@in.ibm.com>2019-01-14 04:57:23 -0600
commit40a7406097c0b5b0670c5987f6fe8c902d65562d (patch)
treea82111a57650276538abe5158d1e57e92db5f1c9
parente165ea956c5557c2b470869d252c80744227b00f (diff)
downloadphosphor-logging-40a7406097c0b5b0670c5987f6fe8c902d65562d.zip
phosphor-logging-40a7406097c0b5b0670c5987f6fe8c902d65562d.tar.gz
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 <dkodihal@in.ibm.com>
-rw-r--r--phosphor-rsyslog-config/server-conf.cpp1
1 files changed, 1 insertions, 0 deletions
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())
OpenPOWER on IntegriCloud