summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCédric Bosdonnat <cedricbosdo@openoffice.org>2010-11-30 23:38:08 +0100
committerCédric Bosdonnat <cedricbosdo@openoffice.org>2010-11-30 23:38:08 +0100
commit8438f9f678fd49c0f5264dc23fb5f7eccb88ffe0 (patch)
tree0d2a67cd7772bdaffc55798ef5bcf5a201f96234
parent6f25a7248561976c60be27255797b8b440d6efae (diff)
[core] Fix deploying an extension with spaces in the path on Linux
-rw-r--r--core/source/org/openoffice/ide/eclipse/core/internal/model/OOo.java6
1 files changed, 2 insertions, 4 deletions
diff --git a/core/source/org/openoffice/ide/eclipse/core/internal/model/OOo.java b/core/source/org/openoffice/ide/eclipse/core/internal/model/OOo.java
index ffa39d7..b217e05 100644
--- a/core/source/org/openoffice/ide/eclipse/core/internal/model/OOo.java
+++ b/core/source/org/openoffice/ide/eclipse/core/internal/model/OOo.java
@@ -47,6 +47,7 @@ import java.io.File;
import java.io.FileInputStream;
import java.io.InputStreamReader;
import java.io.LineNumberReader;
+import java.text.MessageFormat;
import java.util.Properties;
import org.eclipse.core.runtime.IPath;
@@ -413,10 +414,7 @@ public class OOo extends AbstractOOo {
*/
private void addPackage(File pPackageFile, IPath pUserInstallation) throws Exception {
String path = pPackageFile.getAbsolutePath();
- if (getPlatform().equals(Platform.OS_WIN32)) {
- path = "\"" + path + "\""; //$NON-NLS-1$ //$NON-NLS-2$
- }
- String shellCommand = "unopkg gui -f " + path; //$NON-NLS-1$
+ String shellCommand = MessageFormat.format( "unopkg gui -f \"{0}\"", path ); //$NON-NLS-1$
String[] env = SystemHelper.getSystemEnvironement();
String pathsep = System.getProperty("path.separator"); //$NON-NLS-1$