Skip to content

Do not watch child directories of the sym link folders - #22976

Merged
Sheetal Nandi (sheetalkamat) merged 2 commits into
masterfrom
childWatches
Mar 29, 2018
Merged

Sheetal Nandi (sheetalkamat) merged 2 commits into
masterfrom
childWatches

Conversation

@sheetalkamat

Copy link
Copy Markdown
Member

Fixes #22668 and maintains same feature set as fs.watch on windows when node supports it.

Comment thread src/compiler/sys.ts
function watchChildDirectories(parentDir: string, existingChildWatches: ChildWatches, callback: DirectoryWatcherCallback): ChildWatches {
let newChildWatches: DirectoryWatcher[] | undefined;
enumerateInsertsAndDeletes<string, DirectoryWatcher>(
host.directoryExists(parentDir) ? host.getAccessileSortedChildDirectories(parentDir) : emptyArray,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i am guessing this shoudl be getAccessibleSortedChildDirectories

Comment thread src/compiler/sys.ts
host.directoryExists(parentDir) ? host.getAccessileSortedChildDirectories(parentDir) : emptyArray,
host.directoryExists(parentDir) ? mapDefined(host.getAccessileSortedChildDirectories(parentDir), child => {
const childFullName = getNormalizedAbsolutePath(child, parentDir);
return host.filePathComparer(childFullName, host.realpath(childFullName)) === Comparison.EqualTo ? childFullName : undefined;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you add a comment on why we are filtering here.

@mhegazy

Copy link
Copy Markdown
Contributor

Please port to release-2.8 as well

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

2 participants