diff options
author | Deepak Kodihalli <dkodihal@in.ibm.com> | 2017-06-13 07:06:49 -0500 |
---|---|---|
committer | Patrick Williams <patrick@stwcx.xyz> | 2017-06-26 02:33:42 +0000 |
commit | 3388799db3945b038ff95928067c30f210f68d53 (patch) | |
tree | 68d080c51d6de1f600544f14bdb0fa705003629f | |
parent | 9743189cb416059c5f35ab6a4b57f41fa04526ea (diff) | |
download | phosphor-logging-3388799db3945b038ff95928067c30f210f68d53.tar.gz phosphor-logging-3388799db3945b038ff95928067c30f210f68d53.zip |
Remove persisted error file upon error deletion
Change-Id: If2418ad9350d7f3bdbfe28a00728f431f08baf9f
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
-rw-r--r-- | log_manager.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/log_manager.cpp b/log_manager.cpp index 3f61e91..175a000 100644 --- a/log_manager.cpp +++ b/log_manager.cpp @@ -184,8 +184,14 @@ void Manager::processMetadata(const std::string& errorName, void Manager::erase(uint32_t entryId) { auto entry = entries.find(entryId); + auto id = entry->second->id(); if(entries.end() != entry) { + // Delete the persistent representation of this error. + fs::path errorPath(ERRLOG_PERSIST_PATH); + errorPath /= std::to_string(id); + fs::remove(errorPath); + entries.erase(entry); } } |