From 931bb7979a295f78515d87818ebec84f13eb7eb8 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Tue, 5 Feb 2013 05:31:04 -0500 Subject: [PATCH] minor changes --- lib/server/commander.js | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/lib/server/commander.js b/lib/server/commander.js index 5b303c0c..74baea2b 100644 --- a/lib/server/commander.js +++ b/lib/server/commander.js @@ -112,7 +112,7 @@ }; if(n){ - var i, lDirPath = getDirPath(lReq); + var i, lDirPath = getCleanPath(lReq); for(i = 0; i < n; i++){ var lName = lDirPath + lFiles[i], @@ -188,7 +188,7 @@ var lJSON = [], lJSONFile = {}, lList, - lDirPath = getDirPath(lReq); + lDirPath = getCleanPath(lReq); lJSON[0] = { path : lDirPath, @@ -349,15 +349,6 @@ return lPath; } - function getDirPath(pReq){ - var lPath = getPath(pReq); - - /* Если мы не в корне добавляем слеш к будующим ссылкам */ - if(lPath !== '/') - lPath += '/'; - - return lPath; - } function getCleanPath(pReq){ var lPath = getPath(pReq),