Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 356299 - eclipse.ini: configuration parameter does not support URLs with whitespaces
Summary: eclipse.ini: configuration parameter does not support URLs with whitespaces
Status: CLOSED WONTFIX
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: Launcher (show other bugs)
Version: 3.4.2   Edit
Hardware: PC Windows 7
: P3 critical (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-31 05:50 EDT by Andreas Gusenbauer CLA
Modified: 2019-09-28 02:07 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Gusenbauer CLA 2011-08-31 05:50:21 EDT
Build Identifier: M20090211-1700

It is not possible to set the configuration directory to a directory with whitespaces.
E.g. configuration directory 'D:/eclipse/any additional folder/configuration'
eclipse.ini:
-configuration
file:/D:/eclipse/any%20additional%20folder/configuration/

The framework does not convert the URL correctly back to its absolute path - the configuration the seached in 'D:/eclipse/any%20additional%20folder/configuration'

The following configurations work:
-configuration
file:/D:/eclipse/any additional folder/configuration/
-configuration
D:/eclipse/any additional folder/configuration/

... but only as long as the framework changes the parameter in the eclipse.ini automatically to 'file:/D:/eclipse/any%20additional%20folder/configuration/' ... e.g. after plugins are updated.

Reproducible: Always

Steps to Reproduce:
1. Set the configuration parameter in the eclipse.ini to an URL with whitespaces (e.g. file:/D:/eclipse/any%20additional%20folder/configuration/)
2. Run Eclipse
Comment 1 Andreas Gusenbauer CLA 2011-08-31 05:54:52 EDT
Same problem with: Helios Service Release 1 (Build id: 20100917-0705)
Comment 2 John Arthorne CLA 2011-08-31 09:51:10 EDT
Not sure if this is framework or launcher.
Comment 3 Andrew Niefer CLA 2011-09-06 16:39:38 EDT
I think this is launcher, in particular, this goes through Main#buildURL where the is no attempt to deal with encoded urls.
Comment 4 Georg Breitschopf CLA 2017-04-20 09:18:00 EDT
Similar problem when using a hash '#' in the directory. The part after the hash is cut off. Using the URL-encoded form leads to the problem described above.

An analysis of this problem revealed that an (now) deprecated API is used to create the URL.

org.eclipse.osgi.internal.location.LocationHelper#buildURL uses java.io.File#toURL to create the URL. This method does not automatically escape characters that are illegal in URLs.
Comment 5 Eclipse Genie CLA 2019-09-28 02:07:08 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.