mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-05-23 13:16:48 +08:00
GP-1034: New script action now creates ~/ghidra_scripts if it didn't exist
This commit is contained in:
+5
-1
@@ -549,8 +549,12 @@ public class GhidraScriptComponentProvider extends ComponentProviderAdapter {
|
||||
return;
|
||||
}
|
||||
|
||||
// Create user script directory if it doesn't exist
|
||||
File userScriptsDir = new File(GhidraScriptUtil.USER_SCRIPTS_DIR);
|
||||
FileUtilities.checkedMkdirs(userScriptsDir);
|
||||
|
||||
ResourceFile newFile = GhidraScriptUtil.createNewScript(provider,
|
||||
new ResourceFile(GhidraScriptUtil.USER_SCRIPTS_DIR), getScriptDirectories());
|
||||
new ResourceFile(userScriptsDir), getScriptDirectories());
|
||||
SaveDialog dialog = new SaveNewScriptDialog(getComponent(), "New Script", this, newFile,
|
||||
actionManager.getNewHelpLocation());
|
||||
if (dialog.isCancelled()) {
|
||||
|
||||
Reference in New Issue
Block a user