From 5baebead51e3baf25b261c1c76ad814d5c125823 Mon Sep 17 00:00:00 2001 From: Florent Benoit Date: Fri, 16 Feb 2024 15:44:43 +0100 Subject: [PATCH] chore: use new API for open/save dialog Signed-off-by: Florent Benoit --- packages/renderer/src/lib/image/RunImage.svelte | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/renderer/src/lib/image/RunImage.svelte b/packages/renderer/src/lib/image/RunImage.svelte index bdee544dbb60d..b6dab0d50876b 100644 --- a/packages/renderer/src/lib/image/RunImage.svelte +++ b/packages/renderer/src/lib/image/RunImage.svelte @@ -201,9 +201,9 @@ async function getPortsInfo(portDescriptor: string): Promise * Select an environment file */ async function selectEnvironmentFile(index: number) { - const result = await window.openFileDialog('Select environment file'); - if (!result.canceled && result.filePaths.length === 1) { - environmentFiles[index] = result.filePaths[0]; + const filePaths = await window.openDialog({ title: 'Select environment file' }); + if (filePaths?.length === 1) { + environmentFiles[index] = filePaths[0]; } }