From fade11f10ffe0a216cb926df950a0932de118aff Mon Sep 17 00:00:00 2001 From: coderaiser Date: Tue, 27 May 2014 09:18:28 -0400 Subject: [PATCH] refactor(commander) rm global.cloudcmd condition --- lib/server/commander.js | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/lib/server/commander.js b/lib/server/commander.js index 82b3e9c3..30862cab 100644 --- a/lib/server/commander.js +++ b/lib/server/commander.js @@ -1,21 +1,20 @@ (function() { 'use strict'; - if (!global.cloudcmd) - return console.log( - '# commander.js' + '\n' + - '# -----------' + '\n' + - '# Module is part of Cloud Commander,' + '\n' + - '# used for getting dir content.' + '\n' + - '# and forming html content' + '\n' + - '# http://cloudcmd.io' + '\n'); - - var main = global.cloudcmd.main, - fs = main.fs, - Util = main.util, - users = main.users, + /* + '# commander.js' + '\n' + + '# -----------' + '\n' + + '# Module is part of Cloud Commander,' + '\n' + + '# used for getting dir content.' + '\n' + + '# and forming html content' + '\n' + + '# http://cloudcmd.io' + '\n'); + */ + + var fs = require('fs'), + Util = require('../util'), + users = require('./users'), - WIN32 = main.WIN32; + WIN32 = process.platform === 'win32'; exports.getDirContent = function(path, callback) { var isString = Util.isString(path);