Skip to content

Commit 8734628

Browse files
committed
Exclude invocations from unrelated in-project folders
1 parent e03747a commit 8734628

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/cmakeListsModifier.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,8 +236,10 @@ export class CMakeListsModifier implements vscode.Disposable {
236236
function invocationCompare(a: CommandInvocation, b: CommandInvocation) {
237237
return targetSourceCommandInvocationCompare(settings.targetSourceCommands, a, b);
238238
}
239-
let invocations = await targetSourceCommandInvocations(
240-
project, target, cmakeListsASTs, settings.targetSourceCommands);
239+
let invocations = (await targetSourceCommandInvocations(
240+
project, target, cmakeListsASTs, settings.targetSourceCommands))
241+
.filter(i =>
242+
isFileInsideFolder(newSourceUri, path.dirname(i.document.fileName)));
241243
if (errorIfSourceInInvocations(invocations, target.name, newSourceUri)) {
242244
return;
243245
}

0 commit comments

Comments
 (0)