mirror of
https://github.com/microsoft/vscode.git
synced 2026-10-06 16:39:08 +01:00
Do not normalize paths (fixes #57475)
This commit is contained in:
1 parent
639fe304f4
commit
fa30debe48
2 files changed
+13
-1
No files matched your search
@@ -343,7 +343,7 @@ function wrapRelativePattern(parsedPattern: ParsedStringPattern, arg2: string |
|
||||
return null;
|
||||
}
|
||||
|
||||
return parsedPattern(paths.normalize(arg2.pathToRelative(arg2.base, path)), basename);
|
||||
return parsedPattern(arg2.pathToRelative(arg2.base, path), basename);
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -999,4 +999,16 @@ suite('Glob', () => {
|
||||
test('pattern with "base" does not explode - #36081', function () {
|
||||
assert.ok(glob.match({ 'base': true }, 'base'));
|
||||
});
|
||||
|
||||
test('relative pattern - #57475', function () {
|
||||
if (isWindows) {
|
||||
let p: glob.IRelativePattern = { base: 'C:\\DNXConsoleApp\\foo', pattern: 'styles/style.css', pathToRelative: (from, to) => path.relative(from, to) };
|
||||
assertGlobMatch(p, 'C:\\DNXConsoleApp\\foo\\styles\\style.css');
|
||||
assertNoGlobMatch(p, 'C:\\DNXConsoleApp\\foo\\Program.cs');
|
||||
} else {
|
||||
let p: glob.IRelativePattern = { base: '/DNXConsoleApp/foo', pattern: 'styles/style.css', pathToRelative: (from, to) => path.relative(from, to) };
|
||||
assertGlobMatch(p, '/DNXConsoleApp/foo/styles/style.css');
|
||||
assertNoGlobMatch(p, '/DNXConsoleApp/foo/Program.cs');
|
||||
}
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user