From 7ee6b78b9f901e84be31117940ab7ab8af631e9d Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Thu, 10 Dec 2009 18:26:37 +0100 Subject: remove one case when we write data needlessly; remove 2 unused funcs Signed-off-by: Denys Vlasenko --- src/Daemon/MiddleWare.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/Daemon/MiddleWare.cpp') diff --git a/src/Daemon/MiddleWare.cpp b/src/Daemon/MiddleWare.cpp index e775764..e483f3f 100644 --- a/src/Daemon/MiddleWare.cpp +++ b/src/Daemon/MiddleWare.cpp @@ -427,12 +427,12 @@ report_status_t Report(const map_crash_report_t& pCrashReport, std::string packageNVR = pCrashReport.find(FILENAME_PACKAGE)->second[CD_CONTENT]; std::string packageName = packageNVR.substr(0, packageNVR.rfind("-", packageNVR.rfind("-") - 1)); - // Save comments and how to reproduciton + // Save comment and "how to reproduce" map_crash_report_t::const_iterator it_comment = pCrashReport.find(CD_COMMENT); map_crash_report_t::const_iterator it_reproduce = pCrashReport.find(CD_REPRODUCE); - std::string pDumpDir = getDebugDumpDir(UUID.c_str(), UID.c_str()); - + if (it_comment != pCrashReport.end() || it_reproduce != pCrashReport.end()) { + std::string pDumpDir = getDebugDumpDir(UUID.c_str(), UID.c_str()); CDebugDump dd; dd.Open(pDumpDir.c_str()); if (it_comment != pCrashReport.end()) -- cgit