fixing multiple / in paths
[nodejs-repoproxy.git] / lib / cache.js
index 4f98d3c..5a01871 100644 (file)
@@ -103,10 +103,8 @@ function getAndService(unify, xpath, filesize) {
        log.debug("calling in here with filesize, ", filesize)
        unify.b.writeHead(200, {'Content-Length' : filesize});
 
-       
        global.repoproxy.downloads[unify.fullFilePath] = 1;
        
-
        http.get(xpath, function(res) {
 
            var file = fs.createWriteStream(unify.fullFilePath);
@@ -193,7 +191,8 @@ function inlineService(unify) {
                                                }
                                        }
                                } else {
-                                       log.debug("inline service - we're in a very bad place");
+                                       log.error("inline service - we're in a very bad place, how we ended up here we dont know, but we need to crash");
+                                       process.exit(10);
                                }
                        });
                        
@@ -346,10 +345,6 @@ function moveToCleanup(file_or_dir) {
        fs.renameSync(file_or_dir.replace(/\/$/, ""), toloc);
 }
 
-function cleanupRoutine() {
-       
-}
-
 
 exports.serviceDirectory = serviceDirectory;
 exports.moveToCleanup = moveToCleanup;