Permalink
Browse files

Add migration for path.existsSync

  • Loading branch information...
1 parent f01e418 commit 59a58e81197ef81a0e9dee762088257e6f3869c2 @shama shama committed Jun 25, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/glob.js
View
@@ -9,6 +9,7 @@
var fs = require('fs');
var path = require('path');
+var existsSync = fs.existsSync || path.existsSync;
// Export minimatch, in case something else needs direct access to it.
exports.minimatch = require('minimatch');
@@ -56,7 +57,7 @@ exports.glob = function(pattern, options) {
var filepaths = [];
(function recurse(dirpath, depth) {
// Abort if, for whatever reason, dirpath doesn't exist.
- if (!path.existsSync(dirpath)) { return; }
+ if (!existsSync(dirpath)) { return; }
// Read directory contents.
fs.readdirSync(dirpath).forEach(function(filepath) {
var stat;

0 comments on commit 59a58e8

Please sign in to comment.