mirror of
https://github.com/usebruno/bruno.git
synced 2025-06-25 06:21:57 +02:00
Got file selection to work.
This commit is contained in:
parent
50482ee340
commit
c81aded003
@ -117,14 +117,18 @@ const browseFiles = async (win, filters) => {
|
||||
};
|
||||
|
||||
const browseFile = async (win, filters) => {
|
||||
const { filePath } = await dialog.showOpenDialog(win, {
|
||||
const { filePaths } = await dialog.showOpenDialog(win, {
|
||||
properties: ['openFile'],
|
||||
filters
|
||||
});
|
||||
|
||||
if(!filePath) {
|
||||
if(!filePaths) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const filePath = normalizeAndResolvePath(filePaths[0]);
|
||||
|
||||
return isFile(filePath) ? filePath : null;
|
||||
}
|
||||
|
||||
const chooseFileToSave = async (win, preferredFileName = '') => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user