From 29883864086599c58c4dce0fd734a2483d4c0c11 Mon Sep 17 00:00:00 2001 From: Paul J R Date: Thu, 20 Jun 2013 18:35:37 +1000 Subject: [PATCH] fixing a null file bug --- lib/repo-apt.js | 6 ++++-- repos.conf | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/repo-apt.js b/lib/repo-apt.js index 07248a0..fbe433e 100644 --- a/lib/repo-apt.js +++ b/lib/repo-apt.js @@ -9,7 +9,7 @@ function maintain(name, repoinfo, files) { var topdir = path.normalize(global.repoproxy.cacheDir + "/" + name + "/"); function fileCheck(i) { - //console.log("checking file: ", files[i]); + console.log("checking file: ", files[i]); var cfile = files[i].replace(topdir, ""); var ctime_t = new Date(); @@ -49,7 +49,9 @@ function maintain(name, repoinfo, files) { } - fileCheck(0) + + if(typeof files[0] != 'undefined') fileCheck(0) + else console.log("Skipping file check as there are none... apprently?"); } exports.maintain = maintain; \ No newline at end of file diff --git a/repos.conf b/repos.conf index 560d566..f1ab11a 100644 --- a/repos.conf +++ b/repos.conf @@ -7,7 +7,7 @@ cachescan:24 # port to listen on for requests listenport:8008 -ploop:asdf +#ploop:asdf # a repo definition # repo:base_url:type:upstream_url:updateinterval:packageage # were: @@ -17,4 +17,4 @@ ploop:asdf # updateinterval is how often repo meta data is refreshed (days) # packageage is how long a package will go unread before it gets deleted (days) repo:fedora:yum:http://ftp.iinet.net.au/pub/fedora/linux/:7:120 -repo:ubuntu:apt:http://ftp.iinet.net.au/pub/ubuntu/:1:120 \ No newline at end of file +repo:ubuntu:apt:http://ftp.iinet.net.au/pub/ubuntu/:1:120 -- 1.7.0.4