From 0405567aab08e7190d075d245194cb8c579e04d6 Mon Sep 17 00:00:00 2001 From: Andrew Pamment Date: Fri, 12 Aug 2016 07:50:31 +1000 Subject: [PATCH] don't delete tic file if there was an error --- utils/ticproc/ticproc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/utils/ticproc/ticproc.c b/utils/ticproc/ticproc.c index 3dcfc80..d993aa2 100644 --- a/utils/ticproc/ticproc.c +++ b/utils/ticproc/ticproc.c @@ -401,7 +401,9 @@ int process_tic_file(char *ticfilen) { if (ticfile.crc != NULL) { free(ticfile.crc); } - remove(ticfilename); + if (ret == 0) { + remove(ticfilename); + } return ret; }