url: unlink file before trying to download

cute-signatures
Natanael Copa 2009-04-21 08:40:50 +00:00
parent 9d22718d1d
commit 64e0adf0c7
1 changed files with 1 additions and 0 deletions

View File

@ -91,6 +91,7 @@ int apk_url_download(const char *url, const char *file)
if (pid == 0) {
setsid();
dup2(open("/dev/null", O_RDONLY), STDIN_FILENO);
unlink(file);
execlp("wget", "wget", "-q", "-O", file, url, NULL);
exit(0);
}