Remove extra module in skins

This commit is contained in:
Jake 2014-12-06 00:29:06 -06:00
parent dbd66f88a5
commit bc98c66f82
2 changed files with 3 additions and 4 deletions

View File

@ -163,7 +163,7 @@ exp.get_skin = function(uuid, callback) {
var skinpath = __dirname + "/../" + config.skins_dir + hash + ".png";
if (fs.existsSync(skinpath)) {
logging.log("skin already exists, not downloading");
skins.open_skin(hash, function(err, img) {
skins.open_skin(skinpath, function(err, img) {
callback(err, hash, img);
});
return;

View File

@ -1,7 +1,6 @@
var logging = require("./logging");
var lwip = require("lwip");
var fs = require("fs");
var config = require("./config");
var exp = {};
@ -94,8 +93,8 @@ exp.default_skin = function(uuid) {
}
};
exp.open_skin = function(hash, callback) {
fs.readFile(__dirname + "/../" + config.skins_dir + hash + ".png", function (err, buf) {
exp.open_skin = function(skinpath, callback) {
fs.readFile(skinpath, function (err, buf) {
if (err) {
logging.error("error while opening skin file: " + err);
}