From fd120bb5a6d5fd17c440439fec85b712fba3deb8 Mon Sep 17 00:00:00 2001 From: David Lechner Date: Thu, 10 Mar 2022 02:10:34 -0600 Subject: [PATCH] fileStorage: fix incorrect suggested file name --- src/fileStorage/sagas.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/fileStorage/sagas.ts b/src/fileStorage/sagas.ts index 60f4dee2..29d0c0cb 100644 --- a/src/fileStorage/sagas.ts +++ b/src/fileStorage/sagas.ts @@ -112,7 +112,7 @@ function* handleExportFile( try { const handle = yield* call(() => window.showSaveFilePicker({ - suggestedName: 'main.py', + suggestedName: action.fileName, types: [ { accept: { 'text/x-python': '.py' }, @@ -135,7 +135,7 @@ function* handleExportFile( } else { // this is a fallback to use the standard browser download mechanism try { - FileSaver.saveAs(blob, 'main.py'); + FileSaver.saveAs(blob, action.fileName); } catch (err) { yield* put( fileStorageDidFailToExportFile(action.fileName, ensureError(err)),