From 16ef583cdb540fa4ece75ab8c9122bf07c0452cb Mon Sep 17 00:00:00 2001 From: Francois Chouinard Date: Mon, 16 Jul 2012 17:34:12 -0400 Subject: [PATCH] Final fix for Bug384878 Change-Id: I21f95490799461eb8ac161fea48e527dbba27892 Signed-off-by: Francois Chouinard --- .../tmf/ui/project/wizards/ImportTraceWizardPage.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/wizards/ImportTraceWizardPage.java b/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/wizards/ImportTraceWizardPage.java index 91c0dd17e5..5c11c66203 100644 --- a/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/wizards/ImportTraceWizardPage.java +++ b/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/wizards/ImportTraceWizardPage.java @@ -883,7 +883,7 @@ public class ImportTraceWizardPage extends WizardResourceImportPage { String prefix = null; for (int i = 0; i < files.size(); i++) { File file = fileSystemObjects.get(files.get(i)); - String name = file.getAbsolutePath(); + String name = file.getAbsolutePath() + File.separatorChar; if (fTargetFolder != null && (prefix == null || !name.startsWith(prefix))) { prefix = name; // new prefix IResource resource = fTargetFolder.findMember(file.getName()); @@ -941,9 +941,9 @@ public class ImportTraceWizardPage extends WizardResourceImportPage { List subList = new ArrayList(); subList.add(resource); if (resource.isDirectory()) { - String prefix = resource.getAbsolutePath(); + String prefix = resource.getAbsolutePath() + File.separatorChar; boolean hasSamePrefix = true; - for (int j = i; j < fileList.size() && hasSamePrefix; j++) { + for (int j = i + 1; j < fileList.size() && hasSamePrefix; j++) { File res = fileList.get(j); hasSamePrefix = res.getAbsolutePath().startsWith(prefix); if (hasSamePrefix) { -- 2.34.1