fixed bug with slashes on win32

This commit is contained in:
coderaiser 2012-11-29 03:28:03 -05:00
parent c668a82196
commit 045caf467e
3 changed files with 13 additions and 5 deletions

View file

@ -129,6 +129,8 @@ config.json only if it setted up.
* Fixed bug with starting node from other then projects dir.
* Fixed bug with slashes on win32.
2012.10.01, Version 0.1.7

View file

@ -16,7 +16,11 @@
Server = main.require(DIR + 'server'),
srv = Server.CloudServer,
Config = main.config;
/* reinit main dir os if we on
* Win32 should be backslashes */
DIR = main.DIR;
readConfig();
Server.start(Config, {
index : indexProcessing,

View file

@ -5,7 +5,8 @@
LIBDIR,
SRVDIR,
Util,
SLASH,
ISWIN32 = process.platform == 'win32',
OK = 200,
ERROR = 404,
Extensions = {
@ -24,9 +25,10 @@
/* Constants */
/* current dir + 2 levels up */
exports.DIR = DIR = __dirname + '/../../',
exports.LIBDIR = LIBDIR = DIR + 'lib/',
exports.SRVDIR = SRVDIR = LIBDIR + 'server/',
exports.SLASH = SLASH = ISWIN32 ? '\\' : '/',
exports.SRVDIR = SRVDIR = __dirname + SLASH,
exports.LIBDIR = LIBDIR = SRVDIR + '..' + SLASH,
exports.DIR = DIR = LIBDIR + '..' + SLASH,
exports.WIN32 = isWin32();
/* Functions */