mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-08 17:24:01 -05:00
Merge from vscode 2f984aad710215f4e4684a035bb02f55d1a9e2cc (#9819)
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { isWindows } from 'vs/base/common/platform';
|
||||
import { startsWithIgnoreCase, equalsIgnoreCase, endsWith, rtrim } from 'vs/base/common/strings';
|
||||
import { startsWithIgnoreCase, equalsIgnoreCase, rtrim } from 'vs/base/common/strings';
|
||||
import { CharCode } from 'vs/base/common/charCode';
|
||||
import { sep, posix, isAbsolute, join, normalize } from 'vs/base/common/path';
|
||||
|
||||
@@ -235,7 +235,7 @@ export function isWindowsDriveLetter(char0: number): boolean {
|
||||
export function sanitizeFilePath(candidate: string, cwd: string): string {
|
||||
|
||||
// Special case: allow to open a drive letter without trailing backslash
|
||||
if (isWindows && endsWith(candidate, ':')) {
|
||||
if (isWindows && candidate.endsWith(':')) {
|
||||
candidate += sep;
|
||||
}
|
||||
|
||||
@@ -252,7 +252,7 @@ export function sanitizeFilePath(candidate: string, cwd: string): string {
|
||||
candidate = rtrim(candidate, sep);
|
||||
|
||||
// Special case: allow to open drive root ('C:\')
|
||||
if (endsWith(candidate, ':')) {
|
||||
if (candidate.endsWith(':')) {
|
||||
candidate += sep;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user