Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoland Grunberg2015-06-01 10:40:12 -0400
committerRoland Grunberg2015-06-01 14:02:35 -0400
commit9f3ab39067cba5ba170eaff193f8b09b612efb72 (patch)
treee16eda586e07f0189f4acfcfa648a80cbcfaefc3
parent1c6097d11200c3d8a15d4009e2d16e621cd39c30 (diff)
downloadorg.eclipse.linuxtools-9f3ab39067cba5ba170eaff193f8b09b612efb72.tar.gz
org.eclipse.linuxtools-9f3ab39067cba5ba170eaff193f8b09b612efb72.tar.xz
org.eclipse.linuxtools-9f3ab39067cba5ba170eaff193f8b09b612efb72.zip
Bug 468964: Pass script path as array to ensure proper tokenization.
Some paths may contain spaces, so passing elements to Runtime.getRuntime.exec() as String arrays will avoid tokenization by spaces. Change-Id: Iadd51d7783545a4ed4da418222faf2eed63569c1 Reviewed-on: https://git.eclipse.org/r/49100 Reviewed-by: Roland Grunberg <rgrunber@redhat.com> Tested-by: Roland Grunberg <rgrunber@redhat.com> Tested-by: Hudson CI Reviewed-on: https://git.eclipse.org/r/49121
-rw-r--r--containers/org.eclipse.linuxtools.docker.core/src/org/eclipse/linuxtools/internal/docker/core/DockerConnection.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/containers/org.eclipse.linuxtools.docker.core/src/org/eclipse/linuxtools/internal/docker/core/DockerConnection.java b/containers/org.eclipse.linuxtools.docker.core/src/org/eclipse/linuxtools/internal/docker/core/DockerConnection.java
index c0530fe68a..b79c62048b 100644
--- a/containers/org.eclipse.linuxtools.docker.core/src/org/eclipse/linuxtools/internal/docker/core/DockerConnection.java
+++ b/containers/org.eclipse.linuxtools.docker.core/src/org/eclipse/linuxtools/internal/docker/core/DockerConnection.java
@@ -224,7 +224,7 @@ public class DockerConnection implements IDockerConnection {
File scriptFile = Activator.getDefault().getBundle()
.getDataFile("script.sh"); //$NON-NLS-1$
final Process process = Runtime.getRuntime().exec(
- scriptFile.getAbsolutePath());
+ new String[] { scriptFile.getAbsolutePath() });
process.waitFor();
if (process.exitValue() == 0) {
final InputStream processInputStream = process

Back to the top