Final fix for Bug384878
authorFrancois Chouinard <fchouinard@gmail.com>
Mon, 16 Jul 2012 21:34:12 +0000 (17:34 -0400)
committerFrancois Chouinard <fchouinard@gmail.com>
Mon, 16 Jul 2012 21:36:25 +0000 (17:36 -0400)
Change-Id: I21f95490799461eb8ac161fea48e527dbba27892
Signed-off-by: Francois Chouinard <fchouinard@gmail.com>
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/wizards/ImportTraceWizardPage.java

index 91c0dd17e5091ef09769b52e62867e54d05f136d..5c11c66203097e9cd598a5d83cb15d56ca5528f3 100644 (file)
@@ -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<File> subList = new ArrayList<File>();
             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) {
This page took 0.030467 seconds and 5 git commands to generate.