summaryrefslogtreecommitdiffstats
path: root/lib/plugins/SOSreport.cpp
diff options
context:
space:
mode:
authorKarel Klic <kklic@redhat.com>2010-08-19 11:11:58 +0200
committerKarel Klic <kklic@redhat.com>2010-08-19 11:11:58 +0200
commitd6f6a7a98b83de0d0aa3792fb187b66d9d15953d (patch)
tree3f88861519c32e3180d506507f1de3f8e34dfe45 /lib/plugins/SOSreport.cpp
parent8b22e91dc2ac3e73d628486c91f83da5a0e5ec44 (diff)
parent96071530ea85635cf87a6bf650b7f5ddbd219f44 (diff)
downloadabrt-d6f6a7a98b83de0d0aa3792fb187b66d9d15953d.tar.gz
abrt-d6f6a7a98b83de0d0aa3792fb187b66d9d15953d.tar.xz
abrt-d6f6a7a98b83de0d0aa3792fb187b66d9d15953d.zip
Merge branch 'master' of ssh://git.fedorahosted.org/git/abrt
Diffstat (limited to 'lib/plugins/SOSreport.cpp')
-rw-r--r--lib/plugins/SOSreport.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/lib/plugins/SOSreport.cpp b/lib/plugins/SOSreport.cpp
index 6c8ab1f8..df254ec3 100644
--- a/lib/plugins/SOSreport.cpp
+++ b/lib/plugins/SOSreport.cpp
@@ -53,13 +53,19 @@ void CActionSOSreport::Run(const char *pActionDir, const char *pArgs, int force)
if (!force)
{
CDebugDump dd;
- dd.Open(pActionDir);
+ if (!dd.Open(pActionDir))
+ {
+ VERB1 log(_("Unable to open debug dump '%s'"), pActionDir);
+ return;
+ }
+
bool bt_exists = dd.Exist("sosreport.tar.bz2") || dd.Exist("sosreport.tar.xz");
if (bt_exists)
{
VERB3 log("%s already exists, not regenerating", "sosreport.tar.bz2");
return;
}
+ dd.Close();
}
static const char command_default[] =
@@ -125,7 +131,11 @@ void CActionSOSreport::Run(const char *pActionDir, const char *pArgs, int force)
sosreport_dd_filename += ext;
}
CDebugDump dd;
- dd.Open(pActionDir);
+ if (!dd.Open(pActionDir))
+ {
+ VERB1 log(_("Unable to open debug dump '%s'"), pDebugDumpDir);
+ return;
+ }
//Not useful: dd.SaveText("sosreportoutput", output);
off_t sz = copy_file(sosreport_filename, sosreport_dd_filename.c_str(), 0644);