From fbcc81464c793aeb9135c702a38a3d0573d36a2d Mon Sep 17 00:00:00 2001 From: Farrin Reid Date: Sat, 7 Jul 2012 03:21:49 -0800 Subject: [PATCH 1/2] [fix] path.exists was moved to fs.exists --- lib/reed.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/reed.js b/lib/reed.js index aad6c07..2618f67 100644 --- a/lib/reed.js +++ b/lib/reed.js @@ -572,7 +572,7 @@ reed.refresh = function refresh() { var tasks = []; titles.forEach(function(title) { tasks.push(function(callback) { - path.exists(toFilename(title), function(exists) { + fs.exists(toFilename(title), function(exists) { if (!exists) { redisDelete(toFilename(title), function(err) { if (err) { From 3de79819786b27f2cd8b3adadd8998911355c37c Mon Sep 17 00:00:00 2001 From: Farrin Reid Date: Sat, 7 Jul 2012 03:21:49 -0800 Subject: [PATCH 2/2] [fix] path.existsSync was moved to fs.existsSync --- lib/reed.js | 4 ++-- test/pages.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/reed.js b/lib/reed.js index 2618f67..f3c1b0a 100644 --- a/lib/reed.js +++ b/lib/reed.js @@ -192,7 +192,7 @@ function watch(filename) { if (watched[filename] !== true) { watched[filename] = true; fs.watchFile(filename, function(curr, prev) { - var exists = path.existsSync(filename); + var exists = fs.existsSync(filename); if (exists) { loadFromFilesystem(filename, function(err, metadata, htmlContent) { @@ -226,7 +226,7 @@ function watchPage(filename) { if (watchedPages[filename] !== true) { watchedPages[filename] = true; fs.watchFile(filename, function(curr, prev) { - var exists = path.existsSync(filename); + var exists = fs.existsSync(filename); if (exists) { loadPageFromFilesystem(filename, function(err, metadata, htmlContent) { diff --git a/test/pages.js b/test/pages.js index 8cca7df..6f1d539 100644 --- a/test/pages.js +++ b/test/pages.js @@ -114,7 +114,7 @@ vows.describe('Pages System').addBatch({ }, 'no longer on filesystem': function(err) { - assert.isFalse(path.existsSync(dir + 'newpage.md')); + assert.isFalse(fs.existsSync(dir + 'newpage.md')); }, 'check removed from reed': {