mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-07-14 22:33:05 +02:00
@@ -31,9 +31,7 @@ module.exports = function (Plugins) {
|
||||
return path.join(__dirname, '../../node_modules/', plugin);
|
||||
});
|
||||
|
||||
async.filter(plugins, file.exists, function (plugins) {
|
||||
next(null, plugins);
|
||||
});
|
||||
async.filter(plugins, file.exists, next);
|
||||
},
|
||||
], callback);
|
||||
};
|
||||
@@ -162,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);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user