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();