From a8e22fb5db12b3f859d474ebee814d9578c56299 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Mangano?= Date: Wed, 2 Jan 2013 10:21:33 +0100 Subject: [PATCH] remove broken file on failure --- opustags.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/opustags.c b/opustags.c index 3b52881..35deea6 100644 --- a/opustags.c +++ b/opustags.c @@ -462,6 +462,8 @@ int main(int argc, char **argv){ error = "opustags: invalid file"; if(error){ fprintf(stderr, "%s\n", error); + if(path_out != NULL && out != stdout) + remove(path_out); return EXIT_FAILURE; } return EXIT_SUCCESS;