summaryrefslogtreecommitdiffstats
path: root/src/Daemon/CrashWatcher.cpp
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2009-12-10 13:55:24 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2009-12-10 13:55:24 +0100
commitb07c8d78cbad077ea0596b90b370e2db0fe8b577 (patch)
tree4835acd8741a392833fc2969ec512b21c3f39584 /src/Daemon/CrashWatcher.cpp
parentfc2c5e2f02e6da00e27d68a83277a61efdcc9f83 (diff)
downloadabrt-b07c8d78cbad077ea0596b90b370e2db0fe8b577.tar.gz
abrt-b07c8d78cbad077ea0596b90b370e2db0fe8b577.tar.xz
abrt-b07c8d78cbad077ea0596b90b370e2db0fe8b577.zip
make "abrt-cli --delete randomuuid" report that deletion failed. closes bug 59
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'src/Daemon/CrashWatcher.cpp')
-rw-r--r--src/Daemon/CrashWatcher.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Daemon/CrashWatcher.cpp b/src/Daemon/CrashWatcher.cpp
index 3684d600..88c058b0 100644
--- a/src/Daemon/CrashWatcher.cpp
+++ b/src/Daemon/CrashWatcher.cpp
@@ -193,7 +193,7 @@ int CreateReportThread(const char* pUUID, const char* pUID, int force, const cha
/* Remove dump dir and its DB record */
-void DeleteDebugDump(const char *pUUID, const char *pUID)
+int DeleteDebugDump(const char *pUUID, const char *pUID)
{
try
{
@@ -205,12 +205,16 @@ void DeleteDebugDump(const char *pUUID, const char *pUID)
const char *dump_dir = row.m_sDebugDumpDir.c_str();
if (dump_dir[0] != '\0')
+ {
delete_debug_dump_dir(dump_dir);
+ return 0; /* success */
+ }
}
catch (CABRTException& e)
{
error_msg("%s", e.what());
}
+ return -1; /* failure */
}
void DeleteDebugDump_by_dir(const char *dump_dir)