mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 21:09:43 +00:00
Fix extra dot in pasted file names (#161434)
This commit is contained in:
parent
07a5d2749f
commit
023930e3dc
|
@ -85,7 +85,7 @@ class PasteEditProvider implements vscode.DocumentPasteEditProvider {
|
|||
const baseName = path.basename(file.name, ext);
|
||||
for (let i = 0; ; ++i) {
|
||||
const name = i === 0 ? baseName : `${baseName}-${i}`;
|
||||
const uri = vscode.Uri.joinPath(root, `${name}.${ext}`);
|
||||
const uri = vscode.Uri.joinPath(root, `${name}${ext}`);
|
||||
try {
|
||||
await vscode.workspace.fs.stat(uri);
|
||||
} catch {
|
||||
|
|
Loading…
Reference in a new issue