Permalink
Browse files

Added backwards compatibility

  • Loading branch information...
1 parent 6991c49 commit 75ff9139dc128d87350cef972ed9eecdc59c6f69 ncrohn committed Jun 29, 2012
Showing with 5 additions and 2 deletions.
  1. +5 −2 lib/filesystem.js
View
@@ -40,11 +40,14 @@ fileSystem.getFile = function(filePath, callback) {
});
}
- fs.exists(cacheDir,
+ // Match version for compatibility
+ var exists = (process.version.match(/^v0\.[4-6]{1}\.[0-9]{2}$/)) ? path.exists : fs.exists;
+
+ exists(cacheDir,
function(dirExists) {
if(dirExists) {
- fs.exists(cacheFile,
+ exists(cacheFile,
function(fileExists) {
if(fileExists) {
var cst = fs.statSync(cacheFile),

0 comments on commit 75ff913

Please sign in to comment.