mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-02 20:16:04 +01:00
Fix soundpacks not working
This commit is contained in:
@@ -263,12 +263,12 @@ module.exports = function (Plugins) {
|
|||||||
soundpack.id = pluginData.id;
|
soundpack.id = pluginData.id;
|
||||||
soundpack.dir = path.join(pluginData.path, soundpack.dir);
|
soundpack.dir = path.join(pluginData.path, soundpack.dir);
|
||||||
async.each(Object.keys(soundpack.sounds), function (key, next) {
|
async.each(Object.keys(soundpack.sounds), function (key, next) {
|
||||||
file.exists(path.join(soundpack.dir, soundpack.sounds[key]), function (exists) {
|
file.exists(path.join(soundpack.dir, soundpack.sounds[key]), function (err, exists) {
|
||||||
if (!exists) {
|
if (!exists) {
|
||||||
delete soundpack.sounds[key];
|
delete soundpack.sounds[key];
|
||||||
}
|
}
|
||||||
|
|
||||||
next();
|
next(err);
|
||||||
});
|
});
|
||||||
}, function (err) {
|
}, function (err) {
|
||||||
if (err) {
|
if (err) {
|
||||||
|
|||||||
Reference in New Issue
Block a user