From 64e0adf0c7609e30c76ec190ec843311c956f862 Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Tue, 21 Apr 2009 08:40:50 +0000 Subject: [PATCH] url: unlink file before trying to download --- src/url.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/url.c b/src/url.c index 8502b28..79f66ca 100644 --- a/src/url.c +++ b/src/url.c @@ -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); }