mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-09-28 17:11:11 -09:00
GP-1034: New script action now creates ~/ghidra_scripts if it didn't exist
This commit is contained in:
@@ -549,8 +549,12 @@ public class GhidraScriptComponentProvider extends ComponentProviderAdapter {
|
|||||||
return;
|
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,
|
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,
|
SaveDialog dialog = new SaveNewScriptDialog(getComponent(), "New Script", this, newFile,
|
||||||
actionManager.getNewHelpLocation());
|
actionManager.getNewHelpLocation());
|
||||||
if (dialog.isCancelled()) {
|
if (dialog.isCancelled()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user