Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] jadx open file diaglog input dir path error #1462

Closed
sornian opened this issue Apr 23, 2022 · 3 comments
Closed

[Bug] jadx open file diaglog input dir path error #1462

sornian opened this issue Apr 23, 2022 · 3 comments

Comments

@sornian
Copy link

sornian commented Apr 23, 2022

click menu->file->open(ctrl+o)
then i input the dir path ,the dialog is closed instead of get intothis dir
This problem has bothered me for a long time

@jpstotz
Copy link
Collaborator

jpstotz commented Apr 23, 2022

I also noticed this behavior. It is caused as the dialog allows to select (multiple) files or a whole directory:

fileChooser.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);

By changing fileSelectionMode to JFileChooser.FILES_ONLY it would be possible enter a directory by keyboard so the dialog would change into the specified directory instead of closing. But this would also mean users would no longer be able to select a directory of files.

@skylot
Copy link
Owner

skylot commented Apr 23, 2022

Well, I agree this behavior can be unexpected and sometimes really annoying (accidentally loading a directory with a lot of files can hang up jadx 😢)
Options are:

  1. Just use drag and drop into jadx-gui files pane 🤣
  2. Add separate buttons/actions for files and directories
  3. Ask confirmation on directory open (override approveSelection() method in JFileChooser)
  4. Custom file open dialog with separate buttons for files and directories

I like third option, I will check it and also try option 4 with just replacing buttons.

@skylot
Copy link
Owner

skylot commented Apr 25, 2022

Ok, I commit a fix with confirmation on directory loading, hope it will help.
@sornian please check latest unstable build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants