Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSzymon Brandys2009-03-18 12:23:22 +0000
committerSzymon Brandys2009-03-18 12:23:22 +0000
commitee055a99c3392e82c2f140189b8d0860454821a9 (patch)
tree04287b8844b7264e37431bae9053c7f14bc19a9d
parent4ef746b3ecb3aa3872a80a29b8dff2230ea4a5a7 (diff)
downloadeclipse.platform.team-ee055a99c3392e82c2f140189b8d0860454821a9.tar.gz
eclipse.platform.team-ee055a99c3392e82c2f140189b8d0860454821a9.tar.xz
eclipse.platform.team-ee055a99c3392e82c2f140189b8d0860454821a9.zip
Bug 267003 - [Patch] Wrong paths when local diff is used to create patches
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/GenerateDiffFileWizard.java15
1 files changed, 8 insertions, 7 deletions
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/GenerateDiffFileWizard.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/GenerateDiffFileWizard.java
index 3f298b42f..4f5b39417 100644
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/GenerateDiffFileWizard.java
+++ b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/GenerateDiffFileWizard.java
@@ -1214,9 +1214,9 @@ public class GenerateDiffFileWizard extends Wizard {
super.setVisible(visible);
if (!initialized && visible) {
if (directionSelectionPage.isRightToLeft()) {
- unified_customRelativeText.setText(leftPath);
- } else {
unified_customRelativeText.setText(rightPath);
+ } else {
+ unified_customRelativeText.setText(leftPath);
}
targetFileEdited = true;
}
@@ -1372,18 +1372,19 @@ public class GenerateDiffFileWizard extends Wizard {
private void generateDiffFile(File file) {
String toPath, oldPath = null;
if (targetFileEdited) {
- toPath = optionsPage.getPath();
+ oldPath = optionsPage.getPath();
} else {
if(directionSelectionPage.isRightToLeft()){
- toPath = this.rightPath;
+ oldPath = this.rightPath;
} else {
- toPath = this.leftPath;
+ oldPath = this.leftPath;
}
}
+
if(directionSelectionPage.isRightToLeft()){
- oldPath = this.leftPath;
+ toPath = this.leftPath;
} else {
- oldPath = this.rightPath;
+ toPath = this.rightPath;
}
UnifiedDiffFormatter formatter = new UnifiedDiffFormatter(merger

Back to the top