Hi! I fixed some code for you! #19

Open
wants to merge 2 commits into
from
View
@@ -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) {
@@ -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) {
View
@@ -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': {