File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
extensions/markdown-language-features/src/languageFeatures/copyFiles Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 2
2
* Copyright (c) Microsoft Corporation. All rights reserved.
3
3
* Licensed under the MIT License. See License.txt in the project root for license information.
4
4
*--------------------------------------------------------------------------------------------*/
5
- import * as path from 'path' ;
6
5
import * as picomatch from 'picomatch' ;
7
6
import * as vscode from 'vscode' ;
8
7
import { Utils } from 'vscode-uri' ;
@@ -43,8 +42,9 @@ export class NewFilePathGenerator {
43
42
const desiredPath = getDesiredNewFilePath ( config , document , file ) ;
44
43
45
44
const root = Utils . dirname ( desiredPath ) ;
46
- const ext = path . extname ( file . name ) ;
47
- const baseName = path . basename ( file . name , ext ) ;
45
+ const ext = Utils . extname ( desiredPath ) ;
46
+ let baseName = Utils . basename ( desiredPath ) ;
47
+ baseName = baseName . slice ( 0 , baseName . length - ext . length ) ;
48
48
for ( let i = 0 ; ; ++ i ) {
49
49
if ( token . isCancellationRequested ) {
50
50
return undefined ;
You can’t perform that action at this time.
0 commit comments