mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-04 18:29:37 +02:00
GP-669: Fixing GhidraDev exception when ~/ghidra_scripts doesn't exist
This commit is contained in:
parent
fef756c967
commit
d9283b0b9d
5 changed files with 12 additions and 3 deletions
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<site>
|
||||
<feature url="features/ghidra.ghidradev_2.1.1.qualifier.jar" id="ghidra.ghidradev" version="2.1.1.qualifier">
|
||||
<feature id="ghidra.ghidradev">
|
||||
<category name="ghidra.ghidradev"/>
|
||||
</feature>
|
||||
<category-def name="ghidra.ghidradev" label="Ghidra"/>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<feature
|
||||
id="ghidra.ghidradev"
|
||||
label="GhidraDev"
|
||||
version="2.1.1.qualifier"
|
||||
version="2.1.2.qualifier"
|
||||
provider-name="Ghidra">
|
||||
|
||||
<description>
|
||||
|
|
|
@ -53,6 +53,8 @@ change with future releases.</p>
|
|||
</ul>
|
||||
|
||||
<h2><a name="ChangeHistory"></a>Change History</h2>
|
||||
<p><u><b>2.1.2</b>:</u> Fixed exception that occurred when creating a new Ghidra scripting project
|
||||
if a <i>~/ghidra_scripts</i> directory does not exist.</p>
|
||||
<p><u><b>2.1.1</b>:</u>
|
||||
<ul>
|
||||
<li>
|
||||
|
|
|
@ -3,7 +3,7 @@ Manifest-Version: 1.0
|
|||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: GhidraDev
|
||||
Bundle-SymbolicName: ghidra.ghidradev;singleton:=true
|
||||
Bundle-Version: 2.1.1.qualifier
|
||||
Bundle-Version: 2.1.2.qualifier
|
||||
Bundle-Activator: ghidradev.Activator
|
||||
Require-Bundle: org.eclipse.ant.core;bundle-version="3.5.200",
|
||||
org.eclipse.buildship.core;bundle-version="3.0.0",
|
||||
|
|
|
@ -25,6 +25,7 @@ import org.eclipse.jdt.core.*;
|
|||
|
||||
import ghidra.GhidraApplicationLayout;
|
||||
import ghidra.framework.GModule;
|
||||
import ghidradev.Activator;
|
||||
|
||||
/**
|
||||
* Utility methods for working with Ghidra scripts in Eclipse.
|
||||
|
@ -87,6 +88,12 @@ public class GhidraScriptUtils {
|
|||
|
||||
// Link in the user's personal ghidra_scripts directory
|
||||
if (linkUserScripts) {
|
||||
if (!userScriptsDir.isDirectory()) {
|
||||
if (!userScriptsDir.mkdirs()) {
|
||||
throw new CoreException(new Status(IStatus.ERROR, Activator.PLUGIN_ID,
|
||||
IStatus.ERROR, "Failed to create " + userScriptsDir, null));
|
||||
}
|
||||
}
|
||||
IFolder link = javaProject.getProject().getFolder("Home scripts");
|
||||
link.createLink(new Path(userScriptsDir.getAbsolutePath()), IResource.NONE, monitor);
|
||||
classpathEntries.add(JavaCore.newSourceEntry(link.getFullPath()));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue