diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2013-06-18 07:52:23 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2013-06-18 08:53:35 +0000 |
commit | c51d82f8f616c2c8939b74c1d78f723ef778f0c8 (patch) | |
tree | 293162c153bdd963d6cd45fb3fc083a8f396100b /src/url.c | |
parent | 01ec60f718c388f620598c39bdc0816a0dbe09ac (diff) | |
download | apk-tools-c51d82f8f616c2c8939b74c1d78f723ef778f0c8.tar.gz apk-tools-c51d82f8f616c2c8939b74c1d78f723ef778f0c8.tar.bz2 apk-tools-c51d82f8f616c2c8939b74c1d78f723ef778f0c8.tar.xz apk-tools-c51d82f8f616c2c8939b74c1d78f723ef778f0c8.zip |
url: fix fetching from local repositories
Diffstat (limited to 'src/url.c')
-rw-r--r-- | src/url.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -91,7 +91,7 @@ struct apk_istream *apk_istream_from_fd_url(int atfd, const char *url) pid_t pid; int fd; - if (atfd >= 0 && apk_url_local_file(url) != NULL) + if (apk_url_local_file(url) != NULL) return apk_istream_from_file(atfd, apk_url_local_file(url)); fd = fork_wget(url, &pid); @@ -108,8 +108,8 @@ struct apk_bstream *apk_bstream_from_fd_url(int atfd, const char *url) pid_t pid; int fd; - if (atfd >= 0 && apk_url_local_file(url)) - return apk_bstream_from_file(atfd, url); + if (apk_url_local_file(url) != NULL) + return apk_bstream_from_file(atfd, apk_url_local_file(url)); fd = fork_wget(url, &pid); return apk_bstream_from_fd_pid(fd, pid, translate_wget); |