From 6ab78c02c13d132c232b94ff72aff0e9ab9b9ed8 Mon Sep 17 00:00:00 2001 From: William Douglas Date: Thu, 3 Feb 2011 21:20:34 +0200 Subject: [PATCH] Unlink core files we can't find --- Makefile | 2 +- coredump.c | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 537d3f9..8389df2 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -VERSION = 0.13 +VERSION = 0.14 # # to build this package, you need to have the following components installed: # dbus-glib-devel libnotify-devel gtk2-devel curl-devel diff --git a/coredump.c b/coredump.c index fb9c4c0..f805e6f 100644 --- a/coredump.c +++ b/coredump.c @@ -283,8 +283,10 @@ void process_corefile(char *filename) char newfile[8192]; ptr = extract_core(filename); - if (!ptr) + if (!ptr) { + unlink(filename); return; + } queue_backtrace(ptr); fprintf(stderr, "---[start of coredump]---\n%s\n---[end of coredump]---\n", ptr); -- 2.7.4