Blame 0029-vmcore-remove-original-vmcore-file-in-the-last-step.patch

0b651cb
From d92ce50f162e0e4defeb99a5cf35941b382ba3d7 Mon Sep 17 00:00:00 2001
0b651cb
From: Jakub Filak <jfilak@redhat.com>
0b651cb
Date: Thu, 27 Nov 2014 14:30:48 +0100
0b651cb
Subject: [PATCH] vmcore: remove original vmcore file in the last step
0b651cb
0b651cb
Signed-off-by: Jakub Filak <jfilak@redhat.com>
0b651cb
---
0b651cb
 src/hooks/abrt_harvest_vmcore.py.in | 12 ++++++------
0b651cb
 1 file changed, 6 insertions(+), 6 deletions(-)
0b651cb
0b651cb
diff --git a/src/hooks/abrt_harvest_vmcore.py.in b/src/hooks/abrt_harvest_vmcore.py.in
0b651cb
index c6a7e6b..256f8f1 100644
0b651cb
--- a/src/hooks/abrt_harvest_vmcore.py.in
0b651cb
+++ b/src/hooks/abrt_harvest_vmcore.py.in
0b651cb
@@ -266,12 +266,6 @@ def harvest_vmcore():
0b651cb
             shutil.rmtree(destdirnew)
0b651cb
             continue
0b651cb
 
0b651cb
-        if copyvmcore == 'no':
0b651cb
-            try:
0b651cb
-                shutil.rmtree(f_full)
0b651cb
-            except OSError:
0b651cb
-                sys.stderr.write("Unable to delete '%s'. Ignoring\n" % f_full)
0b651cb
-
0b651cb
         try:
0b651cb
             # Let abrtd know what type of problem it is:
0b651cb
             create_abrtd_info(destdirnew)
0b651cb
@@ -291,6 +285,12 @@ def harvest_vmcore():
0b651cb
         # Get rid of  the .new suffix
0b651cb
         shutil.move(destdirnew, destdir)
0b651cb
 
0b651cb
+        if copyvmcore == 'no':
0b651cb
+            try:
0b651cb
+                shutil.rmtree(f_full)
0b651cb
+            except OSError:
0b651cb
+                sys.stderr.write("Unable to delete '%s'. Ignoring\n" % f_full)
0b651cb
+
0b651cb
         problem.notify_new_path(destdir)
0b651cb
 
0b651cb
 
0b651cb
-- 
0b651cb
1.9.3
0b651cb