diff --git a/src/compiler/sys.ts b/src/compiler/sys.ts index 8d7b1104ff5..5f10a747d42 100644 --- a/src/compiler/sys.ts +++ b/src/compiler/sys.ts @@ -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); diff --git a/src/compiler/tsc.ts b/src/compiler/tsc.ts index d74474142cb..037df11664c 100644 --- a/src/compiler/tsc.ts +++ b/src/compiler/tsc.ts @@ -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);