From 87b0dd01c956aa1f3cd5f5832a03b4148a57c996 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Ma=C5=82ecki?= Date: Tue, 15 May 2012 11:02:46 +0200 Subject: [PATCH] [minor] Use `fs.exists` when available `path.exists*` was moved to `fs` module in joyent/node@e10ed097cb3b506009ab28af4dec93402aa48693. --- lib/nconf/stores/file.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/nconf/stores/file.js b/lib/nconf/stores/file.js index 5620ee11..ae0ffe1f 100644 --- a/lib/nconf/stores/file.js +++ b/lib/nconf/stores/file.js @@ -10,6 +10,7 @@ var fs = require('fs'), util = require('util'), formats = require('../formats'), Memory = require('./memory').Memory, + exists = fs.exists || path.exists, existsSync = fs.existsSync || path.existsSync; // @@ -82,7 +83,7 @@ File.prototype.saveSync = function (value) { File.prototype.load = function (callback) { var self = this; - path.exists(self.file, function (exists) { + exists(self.file, function (exists) { if (!exists) { return callback(null, {}); }