Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 350460 - Relative href paths generated on Windows have incorrect path separator
Summary: Relative href paths generated on Windows have incorrect path separator
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 1.6.0   Edit
Assignee: John Arthorne CLA
QA Contact: David Green CLA
URL:
Whiteboard:
Keywords: contributed
Depends on:
Blocks: 372811
  Show dependency tree
 
Reported: 2011-06-27 11:31 EDT by John Arthorne CLA
Modified: 2012-02-28 22:11 EST (History)
1 user (show)

See Also:


Attachments
Simple fix (2.75 KB, patch)
2011-06-27 11:37 EDT, John Arthorne CLA
greensopinion: iplog+
Details | Diff
mylyn/context/zip (5.77 KB, application/octet-stream)
2011-06-29 16:10 EDT, David Green CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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.