aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Loskutov2018-06-30 09:11:30 -0400
committerAndrey Loskutov2018-07-01 03:18:10 -0400
commita1d12846c9a479da6469ab6365a7fe975ecce032 (patch)
treece40ab1eff268f206204b475a579d4a28af0cb0c
parent115ca52c92444b722e852d4713e34b762e59083e (diff)
downloadeclipse.pde.build-a1d12846c9a479da6469ab6365a7fe975ecce032.tar.gz
eclipse.pde.build-a1d12846c9a479da6469ab6365a7fe975ecce032.tar.xz
eclipse.pde.build-a1d12846c9a479da6469ab6365a7fe975ecce032.zip
Bug 532618 - can't export product when install path contains spaceY20180823-0800Y20180822-2200Y20180815-2200Y20180808-2200Y20180801-2200Y20180725-2200Y20180723-0635Y20180723-0615Y20180720-0300Y20180718-2200Y20180712-0200Y20180705-0105S4_9_0_M3S4_9_0_M2I20180828-0800I20180827-2000I20180827-0800I20180826-2000I20180825-1500I20180824-2000I20180823-0450I20180823-0430I20180823-0100I20180822-2000I20180822-0800I20180821-2000I20180821-0800I20180820-2000I20180820-0800I20180819-2000I20180819-0800I20180818-1500I20180818-0800I20180817-2000I20180816-2000I20180815-2000I20180815-1250I20180814-2000I20180814-0910I20180814-0900I20180813-2000I20180812-2000I20180811-1500I20180810-2000I20180810-0320I20180809-2000I20180808-2000I20180807-2000I20180807-1425I20180807-0350I20180806-2000I20180806-0300I20180805-2000I20180804-1500I20180803-2000I20180801-2000I20180801-0820I20180801-0800I20180801-0550I20180731-2000I20180731-1305I20180731-1250I20180731-1025I20180731-0800I20180731-0340I20180730-2240I20180730-2000I20180730-0800I20180729-2000I20180729-0800I20180728-1500I20180728-0805I20180727-2000I20180726-2000I20180725-2000I20180724-2000I20180723-2000I20180722-2000I20180721-1500I20180720-2000I20180719-2000I20180718-2000I20180718-0130I20180717-2000I20180717-0320I20180716-2000I20180716-0715I20180715-2000I20180714-1500I20180713-2000I20180712-2000I20180711-2000I20180710-2000I20180709-2000I20180708-2000I20180707-1500I20180706-2000I20180705-2000I20180704-2000I20180704-0805I20180704-0605I20180704-0545I20180703-2000I20180702-2000I20180702-0435I20180701-2000
Change-Id: Ia15a4c451504f116aa89294c5b20a64c904ade05 Signed-off-by: Andrey Loskutov <loskutov@gmx.de> Also-by: Jiri Engelthaler <engycz@gmail.com>
-rw-r--r--org.eclipse.pde.build/src/org/eclipse/pde/internal/build/properties/PDEProperties.java16
1 files changed, 11 insertions, 5 deletions
diff --git a/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/properties/PDEProperties.java b/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/properties/PDEProperties.java
index 0d33efd4..f2cddea4 100644
--- a/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/properties/PDEProperties.java
+++ b/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/properties/PDEProperties.java
@@ -1,10 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2006, 2017 IBM Corporation and others.
+ * Copyright (c) 2006, 2018 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*****************************************/
@@ -12,8 +12,7 @@ package org.eclipse.pde.internal.build.properties;
import java.io.File;
import java.io.IOException;
-import java.net.URISyntaxException;
-import java.net.URL;
+import java.net.*;
import java.util.HashMap;
import java.util.Map;
import org.eclipse.ant.core.IAntPropertyValueProvider;
@@ -51,7 +50,14 @@ public class PDEProperties implements IAntPropertyValueProvider {
BundleHelper.getDefault().getLog().log(new Status(IStatus.ERROR, IPDEBuildConstants.PI_PDEBUILD, IPDEBuildConstants.WARNING_PLUGIN_ALTERED, NLS.bind(Messages.exception_missing_pdebuild_folder, antPropertyName), null));
} else {
try {
- result = new File(FileLocator.toFileURL(foundEntry).toURI()).getAbsolutePath();
+ URL fileURL = FileLocator.toFileURL(foundEntry);
+ URI uri = URIUtil.toURI(fileURL);
+ File file = URIUtil.toFile(uri);
+ if (file == null) {
+ BundleHelper.getDefault().getLog().log(new Status(IStatus.ERROR, IPDEBuildConstants.PI_PDEBUILD, IPDEBuildConstants.WARNING_PLUGIN_ALTERED, NLS.bind(Messages.exception_missing_pdebuild_folder, antPropertyName), null));
+ return null;
+ }
+ result = file.getAbsolutePath();
} catch (URISyntaxException e) {
BundleHelper.getDefault().getLog().log(new Status(IStatus.ERROR, IPDEBuildConstants.PI_PDEBUILD, IPDEBuildConstants.EXCEPTION_MALFORMED_URL, e.getMessage(), e));
return null;