Ignore anything starting with ".git"

Fixes #29782
This commit is contained in:
Sheetal Nandi
2019-03-06 15:00:26 -08:00
parent 79a1f29727
commit ec2ee9ff3a
5 changed files with 29 additions and 10 deletions

View File

@@ -1002,7 +1002,7 @@ namespace ts.server {
fileOrDirectory => {
const fileOrDirectoryPath = this.toPath(fileOrDirectory);
project.getCachedDirectoryStructureHost().addOrDeleteFileOrDirectory(fileOrDirectory, fileOrDirectoryPath);
if (isPathInNodeModulesStartingWithDot(fileOrDirectoryPath)) return;
if (isPathIgnored(fileOrDirectoryPath)) return;
const configFilename = project.getConfigFilePath();
// If the the added or created file or directory is not supported file name, ignore the file
@@ -2071,7 +2071,7 @@ namespace ts.server {
watchDir,
(fileOrDirectory) => {
const fileOrDirectoryPath = this.toPath(fileOrDirectory);
if (isPathInNodeModulesStartingWithDot(fileOrDirectoryPath)) return;
if (isPathIgnored(fileOrDirectoryPath)) return;
// Has extension
Debug.assert(result.refCount > 0);