Fix File Chooser Selected Folder
This commit is contained in:
parent
01928393c5
commit
c94e7e7403
3 changed files with 13 additions and 3 deletions
|
@ -100,7 +100,6 @@ import static the.bytecode.club.bytecodeviewer.Constants.*;
|
||||||
* + Add stackmapframes to bytecode decompiler
|
* + Add stackmapframes to bytecode decompiler
|
||||||
* + Add https://github.com/exbin/bined as the replacement Hed Viewer/Editor
|
* + Add https://github.com/exbin/bined as the replacement Hed Viewer/Editor
|
||||||
* + Make the decompilers launch in a separate process
|
* + Make the decompilers launch in a separate process
|
||||||
* + Make it use that global last used file folder inside of export as jar
|
|
||||||
* + Make zipfile not include the decode shit
|
* + Make zipfile not include the decode shit
|
||||||
* + Add decompile as zip for krakatau-bytecode, jd-gui and smali for CLI
|
* + Add decompile as zip for krakatau-bytecode, jd-gui and smali for CLI
|
||||||
* + Add decompile all as zip for CLI
|
* + Add decompile all as zip for CLI
|
||||||
|
|
|
@ -6,6 +6,7 @@ import the.bytecode.club.bytecodeviewer.gui.theme.RSTATheme;
|
||||||
import the.bytecode.club.bytecodeviewer.translation.Language;
|
import the.bytecode.club.bytecodeviewer.translation.Language;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
* Bytecode Viewer (BCV) - Java & Android Reverse Engineering Suite *
|
* Bytecode Viewer (BCV) - Java & Android Reverse Engineering Suite *
|
||||||
|
@ -118,7 +119,14 @@ public class Configuration
|
||||||
if(lastDir.getParentFile() != null && lastDir.getParentFile().exists())
|
if(lastDir.getParentFile() != null && lastDir.getParentFile().exists())
|
||||||
return lastDir;
|
return lastDir;
|
||||||
|
|
||||||
return new File(".");
|
try
|
||||||
|
{
|
||||||
|
return new File(".").getCanonicalFile();
|
||||||
|
}
|
||||||
|
catch (IOException e)
|
||||||
|
{
|
||||||
|
return new File(".");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static File getLastPluginDirectory()
|
public static File getLastPluginDirectory()
|
||||||
|
|
|
@ -44,7 +44,10 @@ public class FileChooser extends JFileChooser
|
||||||
HashSet<String> extensionSet = new HashSet<>(Arrays.asList(extensions));
|
HashSet<String> extensionSet = new HashSet<>(Arrays.asList(extensions));
|
||||||
|
|
||||||
try {
|
try {
|
||||||
setSelectedFile(file);
|
if(file.isDirectory())
|
||||||
|
setCurrentDirectory(file);
|
||||||
|
else
|
||||||
|
setSelectedFile(file);
|
||||||
} catch (Exception ignored) { }
|
} catch (Exception ignored) { }
|
||||||
|
|
||||||
setDialogTitle(title);
|
setDialogTitle(title);
|
||||||
|
|
Loading…
Reference in a new issue