summaryrefslogtreecommitdiffstats
path: root/libopkg
diff options
context:
space:
mode:
authorpixdamix <pixdamix@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>2010-01-11 04:51:32 (EST)
committer pixdamix <pixdamix@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>2010-01-11 04:51:32 (EST)
commit33a5092e4160f4d1577b6e11a18bd0cae253ddad (patch)
tree63b77a4b554929263efd921fa533e08119f8a18d /libopkg
parent4ceba65b87ce3d8961d9bacf369fc1f618e31f1d (diff)
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
Diffstat (limited to 'libopkg')
-rw-r--r--libopkg/opkg_download.c7
1 files changed, 7 insertions, 0 deletions
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 # */