Browse Source

fix undefined ref error

master
poikilos 6 years ago
committed by Jacob Gustafson
parent
commit
15b510953b
  1. 5
      webapp/server.js

5
webapp/server.js

@ -57,6 +57,7 @@ var unique_flags = [
function regeneratePaths() { function regeneratePaths() {
skinDir = minetestPath + "/games/ENLIVEN/mods/codercore/coderskins/textures"; skinDir = minetestPath + "/games/ENLIVEN/mods/codercore/coderskins/textures";
console.log("skinDir: \"" + skinDir + "\"");
} }
function process_logline(line, line_number) { function process_logline(line, line_number) {
@ -348,8 +349,8 @@ app.post('/set-skin', function (req, res){
directPath = skinDir + "/" + destNameNoExt + ".png"; directPath = skinDir + "/" + destNameNoExt + ".png";
indirectPath = skinDir + "/" + destNameNoExt + ".skin"; indirectPath = skinDir + "/" + destNameNoExt + ".skin";
// TODO: make sure my_file and userName values are present // TODO: make sure my_file and userName values are present
if (files.userFile != undefined) { if (files.hasOwnProperty('userFile')) {
if (userName != undefined) { if (fields.hasOwnProperty('userName')) {
var originalPath = files.userFile.path; var originalPath = files.userFile.path;
console.log("trying to rename " + files.userFile.path console.log("trying to rename " + files.userFile.path
+ " to " + directPath); + " to " + directPath);

Loading…
Cancel
Save