[Asterisk-code-review] ast_coredumper: Fix deleting results when output dir is set (asterisk[19])

George Joseph asteriskteam at digium.com
Wed Dec 15 09:02:33 CST 2021


George Joseph has uploaded this change for review. ( https://gerrit.asterisk.org/c/asterisk/+/17691 )


Change subject: ast_coredumper: Fix deleting results when output dir is set
......................................................................

ast_coredumper: Fix deleting results when output dir is set

When OUTPUTDIR is set to another directory and the
--delete-results-after is set, the resulting txt files are
not deleted.

ASTERISK-29794 #close

Change-Id: I1c0071f6809a1e3f5cfc455d6eb08378bc0d7286
---
M contrib/scripts/ast_coredumper
1 file changed, 5 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/91/17691/1

diff --git a/contrib/scripts/ast_coredumper b/contrib/scripts/ast_coredumper
index 353137f..2f685ac 100755
--- a/contrib/scripts/ast_coredumper
+++ b/contrib/scripts/ast_coredumper
@@ -314,7 +314,11 @@
 	fi
 
 	if $DELETE_RESULTS_AFTER ; then
-		rm -rf "${cf//:/-}"-{brief,full,thread1,locks,info}.txt
+		to_delete=$cf
+		if [ -n "$OUTPUTDIR" ] ; then
+			to_delete="$OUTPUTDIR/$cfname"
+		fi
+		rm -rf "${to_delete//:/-}"-{brief,full,thread1,locks,info}.txt
 	fi
 done
 

-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/17691
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 19
Gerrit-Change-Id: I1c0071f6809a1e3f5cfc455d6eb08378bc0d7286
Gerrit-Change-Number: 17691
Gerrit-PatchSet: 1
Gerrit-Owner: George Joseph <gjoseph at digium.com>
Gerrit-CC: Frederic Van Espen <frederic.ve at gmail.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20211215/bfb2f219/attachment-0001.html>


More information about the asterisk-code-review mailing list