mirror of
https://github.com/pybricks/pybricks-code.git
synced 2026-09-12 09:36:27 +00:00
fileStorage: fix incorrect suggested file name
This commit is contained in:
@@ -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)),
|
||||
|
||||
Reference in New Issue
Block a user