diff --git a/commands/export.ts b/commands/export.ts index 6d67ce8d..21979cef 100644 --- a/commands/export.ts +++ b/commands/export.ts @@ -57,7 +57,7 @@ export async function exportFile(name: string, fileName: string): Promise { } const storageContent = storageData.result.content; - if (storageContent.length>1 && storageContent[0]) { + if (storageContent.length > 1 && storageContent[0] && storageContent.length < content.length) { const storageContentString = storageContent.join("\n"); const contentString = content.join("\n"); @@ -108,14 +108,8 @@ export async function exportList(files: string[]): Promise { vscode.window.showWarningMessage('Nothing to export'); } const { atelier, folder } = config().get('export'); - /* - return Promise.all( - files.map(file => { - exportFile(file, getFileName(folder, file, atelier)); - }) - ); - */ - const results = []; + + const results = []; for(let i=0;i exportFile(files[i], getFileName(folder, files[i], atelier))); results.push(result);