Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 350460

Summary: Relative href paths generated on Windows have incorrect path separator
Product: z_Archived Reporter: John Arthorne <john.arthorne>
Component: MylynAssignee: John Arthorne <john.arthorne>
Status: RESOLVED FIXED QA Contact: David Green <greensopinion>
Severity: normal    
Priority: P3 CC: steffen.pingel
Version: unspecifiedKeywords: contributed
Target Milestone: 1.6.0   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Bug Depends on:    
Bug Blocks: 372811    
Attachments:
Description Flags
Simple fix
greensopinion: iplog+
mylyn/context/zip none

Description John Arthorne CLA 2011-06-27 11:31:22 EDT
When wikitext is run on Windows, it generates relative href's between wiki pages that look like this:

<a href="../../../../\Orion\Documentation\User_Guide\Reference\Navigator_page/Navigator-page.html"

If your web server also runs windows, this will resolve ok, but if the server is non-Windows it will be a broken link. This is because back-slash is a legal path character on non-windows.
Comment 1 John Arthorne CLA 2011-06-27 11:37:10 EDT
Created attachment 198660 [details]
Simple fix

Here is a simple fix. A better fix would be to use java.net.URI to represent relative paths. Right now you are likely not properly encoding characters that must be encoded in well-formed URIs.

Sorry for the big diff on imports - this was caused by automatic Organize Imports. I suggest using project-specific settings for code style so that all contributors produce the same output (select the project, > Properties > Java Code Style > Organize Imports > Enable project specific settings).
Comment 2 David Green CLA 2011-06-29 16:10:28 EDT
Patch applied.  Fix pushed to master.

Thanks for the patch!

Steffen do we have recommendations for organize imports settings on Mylyn projects?
Comment 3 David Green CLA 2011-06-29 16:10:30 EDT
Created attachment 198861 [details]
mylyn/context/zip
Comment 4 Steffen Pingel CLA 2011-07-01 09:31:48 EDT
If the patch was applied to CVS the contribution should be marked as iplog+ and the bug should have the contributed keyword (the latter is for reporting only).

I have opened bug 350937 to enable project specific settings for Organize Imports.
Comment 5 David Green CLA 2011-07-14 20:04:11 EDT
done.