url: unlink file before trying to download
parent
9d22718d1d
commit
64e0adf0c7
|
@ -91,6 +91,7 @@ int apk_url_download(const char *url, const char *file)
|
||||||
if (pid == 0) {
|
if (pid == 0) {
|
||||||
setsid();
|
setsid();
|
||||||
dup2(open("/dev/null", O_RDONLY), STDIN_FILENO);
|
dup2(open("/dev/null", O_RDONLY), STDIN_FILENO);
|
||||||
|
unlink(file);
|
||||||
execlp("wget", "wget", "-q", "-O", file, url, NULL);
|
execlp("wget", "wget", "-q", "-O", file, url, NULL);
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue