Unlink core files we can't find
authorWilliam Douglas <william.douglas@linux.intel.com>
Thu, 3 Feb 2011 19:20:34 +0000 (21:20 +0200)
committerWilliam Douglas <william.douglas@linux.intel.com>
Thu, 3 Feb 2011 19:20:34 +0000 (21:20 +0200)
Makefile
coredump.c

index 537d3f9..8389df2 100644 (file)
--- 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
index fb9c4c0..f805e6f 100644 (file)
@@ -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);