mirror of
https://github.com/azures04/crafatar.git
synced 2026-05-06 19:10:38 +02:00
more changes for #77
This commit is contained in:
@@ -237,7 +237,7 @@ exp.get_skin = function(rid, uuid, callback) {
|
||||
fs.exists(skinpath, function(exists) {
|
||||
if (exists) {
|
||||
logging.log(rid + "skin already exists, not downloading");
|
||||
skins.open_skin(uuid, skinpath, function(err, img) {
|
||||
skins.open_skin(rid, skinpath, function(err, img) {
|
||||
callback(err, hash, img);
|
||||
});
|
||||
} else {
|
||||
@@ -306,7 +306,7 @@ exp.get_cape = function(rid, uuid, callback) {
|
||||
fs.exists(capepath, function(exists) {
|
||||
if (exists) {
|
||||
logging.log(rid + "cape already exists, not downloading");
|
||||
skins.open_skin(uuid, capepath, function(err, img) {
|
||||
skins.open_skin(rid, capepath, function(err, img) {
|
||||
callback(err, hash, img);
|
||||
});
|
||||
} else {
|
||||
|
||||
@@ -95,7 +95,7 @@ exp.default_skin = function(uuid) {
|
||||
|
||||
// helper method for opening a skin file from +skinpath+
|
||||
// callback contains error, image buffer
|
||||
exp.open_skin = function(uuid, skinpath, callback) {
|
||||
exp.open_skin = function(rid, skinpath, callback) {
|
||||
fs.readFile(skinpath, function(err, buf) {
|
||||
if (err) {
|
||||
logging.error(rid + "error while opening skin file: " + err);
|
||||
|
||||
Reference in New Issue
Block a user