getRawLocation patch #383

This commit is contained in:
Vladimir Kononovich 2019-04-08 17:02:19 +03:00 committed by Ryan Kurtz
parent 985d76bf3c
commit ea60dcb9b5
4 changed files with 5 additions and 5 deletions

View file

@ -222,7 +222,7 @@ public class GhidraModuleUtils {
} }
File ghidraInstallDir = ghidraLayout.getApplicationInstallationDir().getFile(false); File ghidraInstallDir = ghidraLayout.getApplicationInstallationDir().getFile(false);
File antFile = new File(project.getRawLocation().toFile(), ".antProperties.xml"); // hidden File antFile = new File(project.getLocation().toFile(), ".antProperties.xml"); // hidden
try (PrintWriter writer = new PrintWriter(new FileWriter(antFile))) { try (PrintWriter writer = new PrintWriter(new FileWriter(antFile))) {
writer.println( writer.println(

View file

@ -352,7 +352,7 @@ public class GhidraProjectUtils {
IFolder ghidraFolder = IFolder ghidraFolder =
javaProject.getProject().getFolder(GhidraProjectUtils.GHIDRA_FOLDER_NAME); javaProject.getProject().getFolder(GhidraProjectUtils.GHIDRA_FOLDER_NAME);
IPath oldGhidraInstallPath = ghidraFolder.exists() IPath oldGhidraInstallPath = ghidraFolder.exists()
? new Path(ghidraFolder.getRawLocation().toFile().getAbsolutePath()) ? new Path(ghidraFolder.getLocation().toFile().getAbsolutePath())
: null; : null;
// Loop through the project's existing classpath to decide what to keep (things that aren't // Loop through the project's existing classpath to decide what to keep (things that aren't

View file

@ -111,7 +111,7 @@ public class ExportGhidraModuleWizard extends Wizard implements INewWizard {
// Get path to Ghidra installation directory // Get path to Ghidra installation directory
String ghidraInstallDirPath = project.getFolder( String ghidraInstallDirPath = project.getFolder(
GhidraProjectUtils.GHIDRA_FOLDER_NAME).getRawLocation().toOSString(); GhidraProjectUtils.GHIDRA_FOLDER_NAME).getLocation().toOSString();
// Get project's java. Gradle should use the same version. // Get project's java. Gradle should use the same version.
// TODO: It's more correct to get this from the project's classpath, since Ghidra's // TODO: It's more correct to get this from the project's classpath, since Ghidra's
@ -126,7 +126,7 @@ public class ExportGhidraModuleWizard extends Wizard implements INewWizard {
// Setup the Gradle build attributes // Setup the Gradle build attributes
List<String> tasks = new ArrayList<>(); List<String> tasks = new ArrayList<>();
String workingDir = project.getRawLocation().toOSString(); String workingDir = project.getLocation().toOSString();
String gradleDist = gradleDistribution.toString(); String gradleDist = gradleDistribution.toString();
String gradleUserHome = ""; String gradleUserHome = "";
String javaHome = javaHomeDir.getAbsolutePath(); String javaHome = javaHomeDir.getAbsolutePath();

View file

@ -144,7 +144,7 @@ public class ConfigureGradleWizardPage extends WizardPage {
if (visible) { if (visible) {
IProject project = projectPage.getGhidraModuleProject().getProject(); IProject project = projectPage.getGhidraModuleProject().getProject();
IFolder ghidraFolder = project.getFolder(GhidraProjectUtils.GHIDRA_FOLDER_NAME); IFolder ghidraFolder = project.getFolder(GhidraProjectUtils.GHIDRA_FOLDER_NAME);
File ghidraDir = ghidraFolder.getRawLocation().toFile(); File ghidraDir = ghidraFolder.getLocation().toFile();
try { try {
GhidraApplicationLayout ghidraLayout = new GhidraApplicationLayout(ghidraDir); GhidraApplicationLayout ghidraLayout = new GhidraApplicationLayout(ghidraDir);
ApplicationProperties props = ghidraLayout.getApplicationProperties(); ApplicationProperties props = ghidraLayout.getApplicationProperties();