From 06f9da02bda3f9dab7e9c3e02450bec2df5ce045 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Fri, 1 Feb 2013 03:55:43 -0500 Subject: [PATCH] minor changes --- json/config.json | 2 +- lib/server.js | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/json/config.json b/json/config.json index 2e7884fb..05c7219d 100644 --- a/json/config.json +++ b/json/config.json @@ -2,7 +2,7 @@ "api_url" : "/api/v1", "appcache" : false, "minification" : { - "js" : true, + "js" : false, "css" : true, "html" : false, "img" : true diff --git a/lib/server.js b/lib/server.js index 6db5ba54..4a0aa386 100644 --- a/lib/server.js +++ b/lib/server.js @@ -360,7 +360,7 @@ if(pStat.isDirectory()) Fs.readdir(DirPath, CloudServer._readDir); /* отдаём файл */ - else { + else if(pStat.isFile()){ Fs.readFile(DirPath, CloudServer.getReadFileFunc(DirPath)); Util.log('reading file: '+ DirPath); } @@ -385,6 +385,9 @@ CloudServer.sendResponse(null, pError.toString(), DirPath); return; } + /* Если мы не в корне добавляем слеш к будующим ссылкам */ + if(DirPath !== '/') + DirPath += '/'; pFiles = pFiles.sort();