Ignore symbolic links when enumerating directories

This commit is contained in:
Anders Hejlsberg 2015-01-20 09:58:25 -08:00
parent 1aa67b7fc4
commit 25e52a3975
2 changed files with 4 additions and 3 deletions

View file

@ -232,7 +232,7 @@ module ts {
var directories: string[] = [];
for (var i = 0; i < files.length; i++) {
var name = combinePaths(path, files[i]);
var stat = _fs.statSync(name);
var stat = _fs.lstatSync(name);
if (stat.isFile()) {
if (!extension || fileExtensionIs(name, extension)) {
result.push(name);

View file

@ -323,8 +323,9 @@ module ts {
startTimer();
}
// Upon detecting a file change, wait for the 250ms and then perform a recompilation. The reasoning is that
// in some cases an editor can save all files at once, and we'd like to just perform a single recompilation.
// Upon detecting a file change, wait for 250ms and then perform a recompilation. This gives batch
// operations (such as saving all modified files in an editor) a chance to complete before we kick
// off a new compilation.
function startTimer() {
if (timerHandle) {
clearTimeout(timerHandle);