Skip to content

Node.js based forum software built for the modern web

closes #455

Julian Lam97c5f6009ddf
diff --git a/src/plugins.js b/src/plugins.js
index c887c13185..51e45716b7 100644
--- a/src/plugins.js
+++ b/src/plugins.js
@@ -232,32 +232,13 @@ var fs = require('fs'),
});
},
showInstalled: function(callback) {
- // TODO: Also check /node_modules
var _self = this;
- localPluginPath = path.join(__dirname, '../plugins'),
npmPluginPath = path.join(__dirname, '../node_modules');
async.waterfall([
function(next) {
- async.parallel([
- function(next) {
- fs.readdir(localPluginPath, next);
- },
- function(next) {
- fs.readdir(npmPluginPath, next);
- }
- ], function(err, dirs) {
- if (err) return next(err);
-
- dirs[0] = dirs[0].map(function(file) {
- return path.join(localPluginPath, file);
- }).filter(function(file) {
- var stats = fs.statSync(file);
- if (stats.isDirectory()) return true;
- else return false;
- });
-
- dirs[1] = dirs[1].map(function(file) {
+ fs.readdir(npmPluginPath, function(err, dirs) {
+ dirs = dirs.map(function(file) {
return path.join(npmPluginPath, file);
}).filter(function(file) {
var stats = fs.statSync(file);
@@ -265,7 +246,7 @@ var fs = require('fs'),
else return false;
});
- next(err, dirs[0].concat(dirs[1]));
+ next(err, dirs);
});
},
function(files, next) {