fixing a null file bug
[nodejs-repoproxy.git] / lib / repo-apt.js
index 07248a0..fbe433e 100644 (file)
@@ -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