From 33a5092e4160f4d1577b6e11a18bd0cae253ddad Mon Sep 17 00:00:00 2001 From: pixdamix Date: Mon, 11 Jan 2010 09:51:32 +0000 Subject: [PATCH] Fail if cache_dir is specified and not a directory git-svn-id: http://opkg.googlecode.com/svn/trunk@514 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358 --- libopkg/opkg_download.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libopkg/opkg_download.c b/libopkg/opkg_download.c index cfbf351..c852d86 100644 --- a/libopkg/opkg_download.c +++ b/libopkg/opkg_download.c @@ -199,6 +199,13 @@ opkg_download_cache(const char *src, const char *dest_file_name, goto out1; } + if(!file_is_dir(conf->cache)){ + opkg_msg(ERROR, "%s is not a directory.\n", + conf->cache); + err = 1; + goto out1; + } + for (p = cache_name; *p; p++) if (*p == '/') *p = ','; /* looks nicer than | or # */ -- 2.30.2