Skip to content

Commit

Permalink
Fix files.readdir and files.realpath not being cached
Browse files Browse the repository at this point in the history
enableCache was called before readdir and realpath was added to "files".
  • Loading branch information
zodern committed Jan 5, 2019
1 parent e04c87a commit 5c86db2
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tools/fs/files.js
Original file line number Diff line number Diff line change
Expand Up @@ -1761,11 +1761,6 @@ function enableCache(name) {
};
}

enableCache("readdir");
enableCache("realpath");
enableCache("stat");
enableCache("lstat");

// The fs.exists method is deprecated in Node v4:
// https://nodejs.org/api/fs.html#fs_fs_exists_path_callback
files.exists =
Expand Down Expand Up @@ -1874,3 +1869,8 @@ files.readBufferWithLengthAndOffset = function (filename, length, offset) {
}
return data;
};

enableCache("readdir");
enableCache("realpath");
enableCache("stat");
enableCache("lstat");

0 comments on commit 5c86db2

Please sign in to comment.