[Asterisk-code-review] ast_coredumper: Fix deleting results when output dir is set (asterisk[19])
Friendly Automation
asteriskteam at digium.com
Wed Dec 15 12:35:53 CST 2021
Friendly Automation has submitted this change. ( 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(-)
Approvals:
George Joseph: Looks good to me, approved
Friendly Automation: Approved for Submit
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: 2
Gerrit-Owner: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-CC: Frederic Van Espen <frederic.ve at gmail.com>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20211215/2a10c1e9/attachment.html>
More information about the asterisk-code-review
mailing list