fixes theme screenshots in acp

v1.18.x
psychobunny 10 years ago
parent 4dcba62e95
commit 8403b010a5

@ -6,7 +6,7 @@ var fs = require('fs');
var themesController = {};
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);
fs.exists(themeDir, function(exists) {
if (exists) {
var themeConfig = require(path.join(themeDir, 'theme.json')),
@ -14,7 +14,7 @@ themesController.get = function(req, res, next) {
if (themeConfig.screenshot && fs.existsSync(screenshotPath)) {
res.sendFile(screenshotPath);
} else {
res.sendFile(path.join(__dirname, '../../public/images/themes/default.png'));
res.sendFile(path.join(__dirname, '../../../public/images/themes/default.png'));
}
} else {
return next();

Loading…
Cancel
Save