Pass tests

This commit is contained in:
Peter Jaszkowiak
2017-01-02 23:03:34 -07:00
parent ec544518e8
commit 11f7cc4163
5 changed files with 8 additions and 10 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.0 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

View File

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

View File

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

View File

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

View File

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