Fix fs.exists to existsSync where necessary

This commit is contained in:
Shell Turner 2014-10-01 23:25:25 +02:00
parent 354dac6a52
commit 3abec636fa
1 changed files with 3 additions and 3 deletions

View File

@ -4,9 +4,9 @@ var path = require("path");
var Helper = module.exports = {
getConfig: function () {
var filename = process.env.SHOUT_CONFIG;
if(!filename || !fs.exists(filename)) {
if(!filename || !fs.existsSync(filename)) {
filename = this.resolveHomePath("config.js");
if(!fs.exists(filename)) {
if(!fs.existsSync(filename)) {
filename = path.resolve(__dirname, "..", "config");
}
}
@ -15,7 +15,7 @@ var Helper = module.exports = {
getHomeDirectory: function () {
return (
(process.env.SHOUT_CONFIG && fs.exists(process.env.SHOUT_CONFIG) && this.getConfig().home)
(process.env.SHOUT_CONFIG && fs.existsSync(process.env.SHOUT_CONFIG) && this.getConfig().home)
|| process.env.SHOUT_HOME
|| path.resolve(process.env.HOME, ".shout")
);