src/vs/workbench/contrib/search/common/queryBuilder.ts/normalizeGlobPattern
function normalizeGlobPattern(pattern: string): string {
	return normalizeSlashes(pattern)
		.replace(/^\.\//, '')
		.replace(/\/+$/g, '');
}