Skip to content

Commit

Permalink
Don't attempt to do anything for methods that are passed a non-string…
Browse files Browse the repository at this point in the history
… as the first argument, such as fstat, read, etc.
  • Loading branch information
papandreou committed Dec 4, 2013
1 parent 92ea1f3 commit dc0e541
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/FsPlusGit.js
Expand Up @@ -104,6 +104,11 @@ var FsPlusGit = module.exports = function FsPlusGit(options) {
return fsPropertyValue.apply(fs, args);
}

// Don't try to implement fstat, read etc.
if (typeof path !== 'string') {
return proxyToWrappedFs();
}

// Absolutify and normalize path:
var absolutePath = Path.resolve(process.cwd(), path),
matchGitRepoInPath = typeof absolutePath === 'string' && absolutePath.match(/^(.*?\/[^\/]*\.git)(\/gitFakeFs($|\/.*$)|$)/);
Expand Down

0 comments on commit dc0e541

Please sign in to comment.