Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/launch
diff options
context:
space:
mode:
authorJonah Graham2021-06-14 15:39:14 -0400
committerJonah Graham2021-06-14 22:20:28 -0400
commitd907da99a48af43531006f04578a343fbacebb97 (patch)
tree857d26954ab3c3c2ef9c88fa4ba2918de4e6b27a /launch
parent1ac907184bc8f8e89bbabbfbe06e249dcda7cdfd (diff)
downloadorg.eclipse.cdt-d907da99a48af43531006f04578a343fbacebb97.tar.gz
org.eclipse.cdt-d907da99a48af43531006f04578a343fbacebb97.tar.xz
org.eclipse.cdt-d907da99a48af43531006f04578a343fbacebb97.zip
Bug 573677: Use array based exec commands to avoid problems with spaces
While most of these commands don't actually have spaces in them, or their arguments, avoid the deprecated methods. Change-Id: If7b4324695699d5a6d9a2f8a979657977486d8a4
Diffstat (limited to 'launch')
-rw-r--r--launch/org.eclipse.cdt.flatpak.launcher-feature/feature.properties4
-rw-r--r--launch/org.eclipse.cdt.flatpak.launcher/META-INF/MANIFEST.MF2
-rw-r--r--launch/org.eclipse.cdt.flatpak.launcher/src/org/eclipse/cdt/flatpak/launcher/FlatpakCommandLauncherFactory.java18
3 files changed, 12 insertions, 12 deletions
diff --git a/launch/org.eclipse.cdt.flatpak.launcher-feature/feature.properties b/launch/org.eclipse.cdt.flatpak.launcher-feature/feature.properties
index 628aaaaf9a6..d2607680dc3 100644
--- a/launch/org.eclipse.cdt.flatpak.launcher-feature/feature.properties
+++ b/launch/org.eclipse.cdt.flatpak.launcher-feature/feature.properties
@@ -1,5 +1,5 @@
#################################################################################
-# Copyright (c) 2020 Red Hat, Inc.
+# Copyright (c) 2020, 2021 Red Hat, Inc.
#
# This program and the accompanying materials
# are made available under the terms of the Eclipse Public License 2.0
@@ -15,7 +15,7 @@ featureName=C/C++ Flatpak Launch Support
description=Plugins for launching C/C++ applications in Eclipse Flatpak.
provider=Eclipse CDT
copyright=\
-Copyright (c) 2020 Red Hat, Inc. and others.\n\
+Copyright (c) 2020, 2021 Red Hat, Inc. and others.\n\
This program and the accompanying materials\n\
are made available under the terms of the Eclipse Public License 2.0\n\
which accompanies this distribution, and is available at\n\
diff --git a/launch/org.eclipse.cdt.flatpak.launcher/META-INF/MANIFEST.MF b/launch/org.eclipse.cdt.flatpak.launcher/META-INF/MANIFEST.MF
index c8b42462e33..42a2790d287 100644
--- a/launch/org.eclipse.cdt.flatpak.launcher/META-INF/MANIFEST.MF
+++ b/launch/org.eclipse.cdt.flatpak.launcher/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %Plugin.name
Bundle-SymbolicName: org.eclipse.cdt.flatpak.launcher;singleton:=true
-Bundle-Version: 1.0.100.qualifier
+Bundle-Version: 1.0.200.qualifier
Bundle-Activator: org.eclipse.cdt.flatpak.launcher.FlatpakLaunchPlugin
Bundle-Vendor: %Plugin.vendor
Bundle-Localization: plugin
diff --git a/launch/org.eclipse.cdt.flatpak.launcher/src/org/eclipse/cdt/flatpak/launcher/FlatpakCommandLauncherFactory.java b/launch/org.eclipse.cdt.flatpak.launcher/src/org/eclipse/cdt/flatpak/launcher/FlatpakCommandLauncherFactory.java
index 697046afa54..1bfa1edbc3a 100644
--- a/launch/org.eclipse.cdt.flatpak.launcher/src/org/eclipse/cdt/flatpak/launcher/FlatpakCommandLauncherFactory.java
+++ b/launch/org.eclipse.cdt.flatpak.launcher/src/org/eclipse/cdt/flatpak/launcher/FlatpakCommandLauncherFactory.java
@@ -191,11 +191,11 @@ public class FlatpakCommandLauncherFactory
}
try {
Process p1 = ProcessFactory.getFactory()
- .exec("mkdir -p " + pluginPath.append(path).toOSString()); //$NON-NLS-1$
+ .exec(new String[] { "mkdir", "-p", pluginPath.append(path).toOSString() }); //$NON-NLS-1$ //$NON-NLS-2$
int rc1 = waitFor(p1);
if (rc1 == 0) {
- Process p2 = ProcessFactory.getFactory().exec("cp -ru " + path //$NON-NLS-1$
- + " " + pluginPath.append(path).removeLastSegments(1).toOSString()); //$NON-NLS-1$
+ Process p2 = ProcessFactory.getFactory().exec(new String[] { "cp", "-ru", "path", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ pluginPath.append(path).removeLastSegments(1).toOSString() });
int rc2 = waitFor(p2);
if (rc2 == 0) {
copiedDirs.add(path);
@@ -270,11 +270,11 @@ public class FlatpakCommandLauncherFactory
if (!copiedDirs.contains(path)) {
try {
Process p1 = ProcessFactory.getFactory()
- .exec("mkdir -p " + copiedPath.append(path).toOSString()); //$NON-NLS-1$
+ .exec(new String[] { "mkdir", "-p", copiedPath.append(path).toOSString() }); //$NON-NLS-1$ //$NON-NLS-2$
int rc1 = waitFor(p1);
if (rc1 == 0) {
- Process p2 = ProcessFactory.getFactory().exec("cp -ru " + path //$NON-NLS-1$
- + " " + copiedPath.append(path).removeLastSegments(1).toOSString()); //$NON-NLS-1$
+ Process p2 = ProcessFactory.getFactory().exec(new String[] { "cp", "-ru", path, //$NON-NLS-1$ //$NON-NLS-2$
+ copiedPath.append(path).removeLastSegments(1).toOSString() });
int rc2 = waitFor(p2);
if (rc2 == 0) {
copiedDirs.add(path);
@@ -321,11 +321,11 @@ public class FlatpakCommandLauncherFactory
if (removedDirs.contains(path)) {
try {
Process p1 = ProcessFactory.getFactory()
- .exec("mkdir -p " + hostDir.append(path).toOSString()); //$NON-NLS-1$
+ .exec(new String[] { "mkdir", "-p", hostDir.append(path).toOSString() }); //$NON-NLS-1$ //$NON-NLS-2$
int rc1 = waitFor(p1);
if (rc1 == 0) {
- Process p2 = ProcessFactory.getFactory().exec("cp -ru " + path //$NON-NLS-1$
- + " " + hostDir.append(path).removeLastSegments(1).toOSString()); //$NON-NLS-1$
+ Process p2 = ProcessFactory.getFactory().exec(new String[] { "cp", "-ru", path, //$NON-NLS-1$ //$NON-NLS-2$
+ hostDir.append(path).removeLastSegments(1).toOSString() });
int rc2 = waitFor(p2);
if (rc2 == 0) {
copiedDirs.add(path);

Back to the top