Blob Blame History Raw
From 479f1a6dd0406d50794dd77312d430e6ca8a22d6 Mon Sep 17 00:00:00 2001
From: Jakub Filak <jfilak@redhat.com>
Date: Thu, 27 Nov 2014 14:30:48 +0100
Subject: [PATCH] vmcore: remove original vmcore file in the last step

Signed-off-by: Jakub Filak <jfilak@redhat.com>
---
 src/hooks/abrt_harvest_vmcore.py.in | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/hooks/abrt_harvest_vmcore.py.in b/src/hooks/abrt_harvest_vmcore.py.in
index c6a7e6b..256f8f1 100644
--- a/src/hooks/abrt_harvest_vmcore.py.in
+++ b/src/hooks/abrt_harvest_vmcore.py.in
@@ -266,12 +266,6 @@ def harvest_vmcore():
             shutil.rmtree(destdirnew)
             continue
 
-        if copyvmcore == 'no':
-            try:
-                shutil.rmtree(f_full)
-            except OSError:
-                sys.stderr.write("Unable to delete '%s'. Ignoring\n" % f_full)
-
         try:
             # Let abrtd know what type of problem it is:
             create_abrtd_info(destdirnew)
@@ -291,6 +285,12 @@ def harvest_vmcore():
         # Get rid of  the .new suffix
         shutil.move(destdirnew, destdir)
 
+        if copyvmcore == 'no':
+            try:
+                shutil.rmtree(f_full)
+            except OSError:
+                sys.stderr.write("Unable to delete '%s'. Ignoring\n" % f_full)
+
         problem.notify_new_path(destdir)
 
 
-- 
2.1.0