remove broken file on failure

This commit is contained in:
Frédéric Mangano 2013-01-02 10:21:33 +01:00
parent f75e484ebb
commit a8e22fb5db

View File

@ -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;