Skip to content

Commit

Permalink
fix: Do not glob match against untitled:Untitled* (#3543)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason3S authored Aug 18, 2024
1 parent 85512bb commit 23575b2
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/_server/src/config/documentSettings.mts
Original file line number Diff line number Diff line change
Expand Up @@ -805,7 +805,7 @@ const checkScheme: Record<string, boolean | undefined> = {
gist: false,
repo: true,
sftp: true,
untitled: true,
untitled: false,
'vscode-notebook-cell': true,
'vscode-scm': false,
'vscode-userdata': false,
Expand All @@ -814,8 +814,9 @@ const checkScheme: Record<string, boolean | undefined> = {
};

function canCheckAgainstGlob(uri: Uri): boolean {
const r = checkScheme[uri.scheme] ?? false;
// console.log('canCheckAgainstGlob %o %o', uri.toString(true), r);
let r = checkScheme[uri.scheme] ?? false;
// Note: the path must have a leading slash to be a valid path when doing relative path matching.
r = r && uri.path.startsWith('/');
return r;
}

Expand Down

0 comments on commit 23575b2

Please sign in to comment.