refactoring installation scripts to use node prompt module, lots of other fixes

fixed #263, fixed #264, fixed #265
This commit is contained in:
Julian Lam
2013-09-06 22:22:42 -04:00
parent a88ddc2a4d
commit bec0b46a2c
11 changed files with 216 additions and 173 deletions

View File

@@ -131,7 +131,7 @@ var user = require('./../user.js'),
return;
}
var absolutePath = path.join(global.configuration['ROOT_DIRECTORY'], global.nconf.get('upload_path'), path.basename(oldpicture));
var absolutePath = path.join(__dirname, '../', global.nconf.get('upload_path'), path.basename(oldpicture));
fs.unlink(absolutePath, function(err) {
if(err) {
@@ -152,7 +152,7 @@ var user = require('./../user.js'),
}
var filename = uid + '-profileimg' + extension;
var uploadPath = path.join(global.configuration['ROOT_DIRECTORY'], global.nconf.get('upload_path'), filename);
var uploadPath = path.join(__dirname, '../', global.nconf.get('upload_path'), filename);
winston.info('Attempting upload to: '+ uploadPath);