libbb: add xunlink()

patch: do not try to delete same file twice
This commit is contained in:
Denis Vlasenko
2007-04-05 21:25:15 +00:00
parent 9020d850bf
commit 1bb552b1d9
4 changed files with 19 additions and 16 deletions

View File

@@ -105,8 +105,7 @@ int bbunpack(char **argv,
if (new_name == filename)
filename[strlen(filename)] = '.';
}
if (unlink(del) < 0)
bb_perror_msg_and_die("cannot remove %s", del);
xunlink(del);
#if 0 /* Currently buggy - wrong name: "a.gz: 261% - replaced with a.gz" */
/* Extreme bloat for gunzip compat */