Skip to content

Commit

Permalink
chore: use new API for open/save dialog
Browse files Browse the repository at this point in the history
Signed-off-by: Florent Benoit <[email protected]>
  • Loading branch information
benoitf committed Feb 17, 2024
1 parent b6e663e commit 5baebea
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/renderer/src/lib/image/RunImage.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -201,9 +201,9 @@ async function getPortsInfo(portDescriptor: string): Promise<string | undefined>
* 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];
}
}
Expand Down

0 comments on commit 5baebea

Please sign in to comment.