File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -304,12 +304,18 @@ export const isWindows = process.platform === "win32";
304
304
305
305
export function isWindowsDriveLetter ( code : number ) : boolean {
306
306
// Copied from https://github.com/microsoft/vscode/blob/02c2dba5f2669b924fd290dff7d2ff3460791996/src/vs/base/common/extpath.ts#L265-L267
307
- return code >= /* CharCode.A */ 65 && code <= /* CharCode.Z */ 90 || code >= /* CharCode.a */ 97 && code <= /* CharCode.z */ 122 ;
307
+ return (
308
+ ( code >= /* CharCode.A */ 65 && code <= /* CharCode.Z */ 90 ) ||
309
+ ( code >= /* CharCode.a */ 97 && code <= /* CharCode.z */ 122 )
310
+ ) ;
308
311
}
309
312
export function hasDriveLetter ( path : string , isWindowsOS : boolean = isWindows ) : boolean {
310
313
// Copied from https://github.com/microsoft/vscode/blob/02c2dba5f2669b924fd290dff7d2ff3460791996/src/vs/base/common/extpath.ts#L324-L330
311
314
if ( isWindowsOS ) {
312
- return isWindowsDriveLetter ( path . charCodeAt ( 0 ) ) && path . charCodeAt ( 1 ) === /* CharCode.Colon */ 58 ;
315
+ return (
316
+ isWindowsDriveLetter ( path . charCodeAt ( 0 ) ) &&
317
+ path . charCodeAt ( 1 ) === /* CharCode.Colon */ 58
318
+ ) ;
313
319
}
314
320
315
321
return false ;
You can’t perform that action at this time.
0 commit comments