Skip to content

Commit

Permalink
Bug #48 FileDialog created with SWT.OPEN displays error if no FilterP…
Browse files Browse the repository at this point in the history
…ath set

+if no filename set defaults to location of file

The issue was caused by if no filename was set then it would try to open file "" as a default which creates an error. This is simply fixed by if no filename is set then set the filename to location of the file

Signed-off-by: Jason Wang <[email protected]>
  • Loading branch information
Jason Wang committed Jun 23, 2022
1 parent 77e43f6 commit 61afb9d
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,9 @@ void presetChooserDialog () {
GTK.gtk_file_chooser_set_current_name (handle, buffer);
}
} else {
if (fileName.equals ("")) {
fileName = "./";
}
StringBuilder stringBuilder = new StringBuilder();
if (filterPath.length () > 0) {
if (!uriMode) {
Expand Down

0 comments on commit 61afb9d

Please sign in to comment.