Skip to content

Commit

Permalink
Fix: Cannot select folders correctly in dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
ollm committed Jan 4, 2023
1 parent a6f8f00 commit d7372f7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/opencomic.js
Original file line number Diff line number Diff line change
Expand Up @@ -848,7 +848,7 @@ function openComicDialog(folders = false)

var dialog = electronRemote.dialog;

dialog.showOpenDialog({properties: properties, filters: [{name: language.global.comics, extensions: (folders) ? ['*'] : compatibleExtensions}]}).then(function (files) {
dialog.showOpenDialog({properties: properties, filters: [folders ? {name: language.global.comics} : {name: language.global.comics, extensions: compatibleExtensions}]}).then(function (files) {

if(files.filePaths && files.filePaths[0])
openComic(files.filePaths[0]);
Expand Down Expand Up @@ -908,7 +908,7 @@ function addComic(folders = false)

var dialog = electronRemote.dialog;

dialog.showOpenDialog({properties: properties, filters: [{name: language.global.comics, extensions: (folders) ? ['*'] : compatibleExtensions}]}).then(function(files) {
dialog.showOpenDialog({properties: properties, filters: [folders ? {name: language.global.comics} : {name: language.global.comics, extensions: compatibleExtensions}]}).then(function(files) {

var added = false;

Expand Down

0 comments on commit d7372f7

Please sign in to comment.