From 17d6efff4d1536956c33a4783bdf090081344c99 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Fri, 29 May 2015 08:46:21 -0400 Subject: [PATCH] fix(rest) isRootWin32: no root directory check --- lib/server/rest.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/server/rest.js b/lib/server/rest.js index 02690e0f..8b8f3b14 100644 --- a/lib/server/rest.js +++ b/lib/server/rest.js @@ -15,6 +15,7 @@ path = require('path'), root = require(DIR + 'root'), + config = require(DIR + 'config'), binom = require(DIR + 'binom'), CloudFunc = require(DIR_LIB + 'cloudfunc'), @@ -344,9 +345,10 @@ } function isRootWin32(path) { - var isRoot = path === '/'; + var isRoot = path === '/', + isConfig = config('root') === '/'; - return isWin32 && isRoot; + return isWin32 && isRoot && isConfig; } function getWin32RootMsg(direction) {