mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-03 17:59:46 +02:00
3087 GhidraProjectUtils: Don't get entry folder from path if entry is not CPE_SOURCE
This commit is contained in:
parent
68a9c0a5a3
commit
cc75f89272
1 changed files with 5 additions and 3 deletions
|
@ -388,9 +388,11 @@ public class GhidraProjectUtils {
|
||||||
// If the project is linked to an old Ghidra, keep the list of source folders that are
|
// 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
|
// linked to the Ghidra installation (after updating their paths to point to the new
|
||||||
// Ghidra installation).
|
// Ghidra installation).
|
||||||
IFolder entryFolder =
|
IFolder entryFolder;
|
||||||
ResourcesPlugin.getWorkspace().getRoot().getFolder(entry.getPath());
|
if (entry.getEntryKind() == IClasspathEntry.CPE_SOURCE) {
|
||||||
if (entry.getEntryKind() == IClasspathEntry.CPE_SOURCE && entryFolder.isLinked() &&
|
entryFolder = ResourcesPlugin.getWorkspace().getRoot().getFolder(entry.getPath());
|
||||||
|
}
|
||||||
|
if (entryFolder != null && entryFolder.isLinked() &&
|
||||||
oldGhidraInstallPath != null &&
|
oldGhidraInstallPath != null &&
|
||||||
oldGhidraInstallPath.isPrefixOf(entryFolder.getLocation())) {
|
oldGhidraInstallPath.isPrefixOf(entryFolder.getLocation())) {
|
||||||
String origPath = entryFolder.getLocation().toString();
|
String origPath = entryFolder.getLocation().toString();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue