Merge branch

'GP-1149_ryanmkurtz_PR-3088_stephengeorgewest_GhidraDev-exception'
(Closes #3087, Closes #3088)
This commit is contained in:
Ryan Kurtz 2021-07-23 08:29:47 -04:00
commit 24f23aaeca
4 changed files with 10 additions and 6 deletions

View file

@ -19,7 +19,7 @@
<h1>GhidraDev README</h1>
<p>GhidraDev provides support for developing and debugging Ghidra scripts and modules in Eclipse.
</p>
<p>The information provided in this document is effective as of GhidraDev 2.1.3 and is subject to
<p>The information provided in this document is effective as of GhidraDev 2.1.4 and is subject to
change with future releases.</p>
<ul>
@ -53,6 +53,8 @@ change with future releases.</p>
</ul>
<h2><a name="ChangeHistory"></a>Change History</h2>
<p><u><b>2.1.4</b>:</u> Fixed exception that occurred when performing a "Link Ghidra" on projects
that use a Gradle classpath container.</p>
<p><u><b>2.1.3</b>:</u> Fixed a bug that prevented Ghidra projects from recognizing extensions
installed in the user's <i>~/.ghidra/.ghidra_&lt;version&gt;/Extensions</i> directory.</p>
<p><u><b>2.1.2</b>:</u> Fixed exception that occurred when creating a new Ghidra scripting project

View file

@ -3,7 +3,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: GhidraDev
Bundle-SymbolicName: ghidra.ghidradev;singleton:=true
Bundle-Version: 2.1.3.qualifier
Bundle-Version: 2.1.4.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",

View file

@ -388,9 +388,11 @@ public class GhidraProjectUtils {
// If the project is linked to an old Ghidra, keep the list of source folders that are
// linked to the Ghidra installation (after updating their paths to point to the new
// Ghidra installation).
IFolder entryFolder =
ResourcesPlugin.getWorkspace().getRoot().getFolder(entry.getPath());
if (entry.getEntryKind() == IClasspathEntry.CPE_SOURCE && entryFolder.isLinked() &&
IFolder entryFolder = null;
if (entry.getEntryKind() == IClasspathEntry.CPE_SOURCE) {
entryFolder = ResourcesPlugin.getWorkspace().getRoot().getFolder(entry.getPath());
}
if (entryFolder != null && entryFolder.isLinked() &&
oldGhidraInstallPath != null &&
oldGhidraInstallPath.isPrefixOf(entryFolder.getLocation())) {
String origPath = entryFolder.getLocation().toString();