Respond to PR comments

This commit is contained in:
Andy Hanson
2016-10-12 10:08:43 -07:00
parent 2f77a54ea4
commit 9b2e6a33cf
2 changed files with 13 additions and 9 deletions

View File

@@ -1289,14 +1289,18 @@ namespace ts {
function getWildcardDirectoryFromSpec(spec: string, useCaseSensitiveFileNames: boolean): { key: string, flags: WatchDirectoryFlags } | undefined {
const match = wildcardDirectoryPattern.exec(spec);
return match
? {
if (match) {
return {
key: useCaseSensitiveFileNames ? match[0] : match[0].toLowerCase(),
flags: watchRecursivePattern.test(spec) ? WatchDirectoryFlags.Recursive : WatchDirectoryFlags.None
}
: isImplicitGlob(spec)
? { key: spec, flags: WatchDirectoryFlags.Recursive }
: undefined;
};
}
else if (isImplicitGlob(spec)) {
return { key: spec, flags: WatchDirectoryFlags.Recursive };
}
else {
return undefined;
}
}
/**