Pass tests

v1.18.x
Peter Jaszkowiak 8 years ago
parent ec544518e8
commit 11f7cc4163

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.0 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

@ -7,9 +7,9 @@ var themesController = {};
themesController.get = function (req, res, next) { themesController.get = function (req, res, next) {
var themeDir = path.join(__dirname, '../../../node_modules/' + req.params.theme); var themeDir = path.join(__dirname, '../../../node_modules/' + req.params.theme);
file.exists(themeDir, function (exists) { file.exists(themeDir, function (err, exists) {
if (!exists) { if (err || !exists) {
return next(); return next(err);
} }
var themeConfig = require(path.join(themeDir, 'theme.json')), var themeConfig = require(path.join(themeDir, 'theme.json')),

@ -352,9 +352,7 @@ var middleware;
} }
callback(null, stats.isDirectory()); callback(null, stats.isDirectory());
}); });
}, function (plugins) { }, next);
next(null, plugins);
});
}, },
function (files, next) { function (files, next) {

@ -160,13 +160,13 @@ module.exports = function (Plugins) {
var realPath = pluginData.staticDirs[mappedPath]; var realPath = pluginData.staticDirs[mappedPath];
var staticDir = path.join(pluginPath, realPath); var staticDir = path.join(pluginPath, realPath);
file.exists(staticDir, function (exists) { file.exists(staticDir, function (err, exists) {
if (exists) { if (exists) {
Plugins.staticDirs[pluginData.id + '/' + mappedPath] = staticDir; Plugins.staticDirs[pluginData.id + '/' + mappedPath] = staticDir;
} else { } else {
winston.warn('[plugins/' + pluginData.id + '] Mapped path \'' + mappedPath + ' => ' + staticDir + '\' not found.'); winston.warn('[plugins/' + pluginData.id + '] Mapped path \'' + mappedPath + ' => ' + staticDir + '\' not found.');
} }
callback(); callback(err);
}); });
} }
} }

@ -262,11 +262,11 @@ module.exports.testSocket = function (socketPath, callback) {
var file = require('./file'); var file = require('./file');
async.series([ async.series([
function (next) { function (next) {
file.exists(socketPath, function (exists) { file.exists(socketPath, function (err, exists) {
if (exists) { if (exists) {
next(); next();
} else { } else {
callback(); callback(err);
} }
}); });
}, },

Loading…
Cancel
Save