Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Khouzam2014-08-25 14:21:43 +0000
committerBernd Hufmann2014-08-26 15:44:24 +0000
commit0dee14cd268e3dc96f9f8a8626759bb18117ef9c (patch)
tree55ddaa99faa369ee1586258867cad01a651e9036
parent31e5f1caf5b878910ba77932f1350ebfb3fa27a1 (diff)
downloadorg.eclipse.linuxtools-0dee14cd268e3dc96f9f8a8626759bb18117ef9c.tar.gz
org.eclipse.linuxtools-0dee14cd268e3dc96f9f8a8626759bb18117ef9c.tar.xz
org.eclipse.linuxtools-0dee14cd268e3dc96f9f8a8626759bb18117ef9c.zip
pcap: fix bug with importing from control view in windows
The path to import in windows was /c:/bla/blabla which causes a crash in PcapTrace that uses java.nio.file.Path. This patch ensures that the remote import passes a valid path string. Change-Id: I3d51bb9e3229e08f327c0d385452acb8c169f6ba Signed-off-by: Matthew Khouzam <matthew.khouzam@ericsson.com> Signed-off-by: Bernd Hufmann <Bernd.Hufmann@ericsson.com> Reviewed-on: https://git.eclipse.org/r/32240 Tested-by: Hudson CI Reviewed-on: https://git.eclipse.org/r/32339
-rw-r--r--lttng/org.eclipse.linuxtools.lttng2.control.ui/src/org/eclipse/linuxtools/internal/lttng2/control/ui/views/handlers/ImportHandler.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/lttng/org.eclipse.linuxtools.lttng2.control.ui/src/org/eclipse/linuxtools/internal/lttng2/control/ui/views/handlers/ImportHandler.java b/lttng/org.eclipse.linuxtools.lttng2.control.ui/src/org/eclipse/linuxtools/internal/lttng2/control/ui/views/handlers/ImportHandler.java
index c1d88c8e94..99ea37c732 100644
--- a/lttng/org.eclipse.linuxtools.lttng2.control.ui/src/org/eclipse/linuxtools/internal/lttng2/control/ui/views/handlers/ImportHandler.java
+++ b/lttng/org.eclipse.linuxtools.lttng2.control.ui/src/org/eclipse/linuxtools/internal/lttng2/control/ui/views/handlers/ImportHandler.java
@@ -181,7 +181,7 @@ public class ImportHandler extends BaseControlViewHandler {
TraceTypeHelper helper = null;
try {
- helper = TmfTraceTypeUIUtils.selectTraceType(file.getLocationURI().getPath(), null, null);
+ helper = TmfTraceTypeUIUtils.selectTraceType(file.getLocation().toOSString(), null, null);
} catch (TmfTraceImportException e) {
// the trace did not match any trace type
}
@@ -307,7 +307,7 @@ public class ImportHandler extends BaseControlViewHandler {
monitor.setCanceled(true);
return;
}
- String destination = folder.getLocation().addTrailingSeparator().append(sources[i].getName()).toString();
+ String destination = folder.getLocation().addTrailingSeparator().append(sources[i].getName()).toOSString();
subMonitor.setTaskName(Messages.TraceControl_DownloadTask + ' ' + traceName + '/' + sources[i].getName());
fsss.download(sources[i], destination, null, subMonitor.newChild(1));
}

Back to the top