mirror of
https://github.com/Microsoft/vscode
synced 2024-10-30 01:37:20 +00:00
Handle empty paste array (#202038)
This commit is contained in:
parent
fbb656b4d2
commit
e1f8dddce9
1 changed files with 1 additions and 1 deletions
|
@ -1097,7 +1097,7 @@ export const pasteFileHandler = async (accessor: ServicesAccessor, fileList?: Fi
|
|||
|
||||
const toPaste = await getFilesToPaste(fileList, clipboardService);
|
||||
|
||||
if (confirmPasteNative) {
|
||||
if (confirmPasteNative && toPaste?.length >= 1) {
|
||||
const message = toPaste.length > 1 ?
|
||||
nls.localize('confirmMultiPasteNative', "Are you sure you want to paste the following {0} items?", toPaste.length) :
|
||||
nls.localize('confirmPasteNative', "Are you sure you want to paste '{0}'?", basename(toPaste[0].fsPath));
|
||||
|
|
Loading…
Reference in a new issue