Commit 0a97e2e3 authored by agurov's avatar agurov

NPE in CreatePatchWizard [ID-AW5HY] (bug 481725)

https://bugs.eclipse.org/bugs/show_bug.cgi?id=481725

git-svn-id: https://dev.eclipse.org/svnroot/technology/org.eclipse.subversive/trunk@21512 ee007c2a-0a25-0410-9ab9-bf268980928c
parent ececddcc
......@@ -65,7 +65,10 @@ public class CreatePatchWizard extends AbstractSVNWizard {
}
public IResource getTargetFolder() {
return ResourcesPlugin.getWorkspace().getRoot().getFileForLocation(new Path(this.getFileName())).getParent();
if (this.selectFile.getFile() != null) {
return this.selectFile.getFile().getParent();
}
return ResourcesPlugin.getWorkspace().getRoot().getContainerForLocation(new Path(this.getFileName()).removeLastSegments(1));
}
public String getFileName() {
......
......@@ -148,6 +148,10 @@ public class SelectPatchFilePage extends AbstractVerifiedWizardPage {
return Arrays.asList(this.realSelection).toArray(new IResource[this.realSelection.length]);
}
public IFile getFile() {
return this.file;
}
public String getFileName() {
return this.fileName;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment