From d0d00e882437092f521d2d7893cc56ee296d278f Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Tue, 29 Aug 2017 08:37:02 +0200 Subject: [PATCH] [json] match only schemas of current folder --- extensions/json/client/src/jsonMain.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/extensions/json/client/src/jsonMain.ts b/extensions/json/client/src/jsonMain.ts index 0373150f728..ecbb69fb490 100644 --- a/extensions/json/client/src/jsonMain.ts +++ b/extensions/json/client/src/jsonMain.ts @@ -217,7 +217,12 @@ function getSettings(): Settings { if (url && url[0] === '.') { url = Uri.file(path.normalize(path.join(folder.uri.fsPath, url))).toString(); } - schemas.push({ url, fileMatch: schema.fileMatch, schema: schema.schema }); + let fileMatch = schema.fileMatch; + + if (fileMatch) { + fileMatch = fileMatch.map(m => path.join(folder.uri.path + '*', m)); + } + schemas.push({ url, fileMatch, schema: schema.schema }); }); }; });