Opened 15 years ago

Closed 14 years ago

#2690 closed defect (fixed)

intern-strings breaks when absolute paths are used

Reported by: [email protected] Owned by: James Burke
Priority: high Milestone: 1.0
Component: BuildSystem Version: 0.4.2
Keywords: Cc:
Blocked By: Blocking:


If absolute paths are used in the Ant build properties, the intern-strings target fails. This is down to the 'makeResourceUri' function in buildUtil.js incorrectly building paths to the resource to be interned.

For example, if one of the prefixes passed to the 'makeResourceUri' function is '/work/dojo', then it will return '../work/dojo/src/widget/templates/MyWidget.html' , which is obviously incorrect.

A simple fix for this is to check if the prefix is absolute. To do this, check if the first character is '/' or the second character is ':' for Windows systems. If so, then do not prepend the srcRoot to the result of the 'makeResourceUri' function.

E.g. Final path construction var finalPath = srcRoot;

if(bestPrefixPath.indexOf("/") == 0
bestPrefixPath.indexOf(":") == 1){

finalPath = "";


Change History (3)

comment:1 Changed 15 years ago by James Burke

Owner: changed from alex to James Burke

comment:2 Changed 14 years ago by James Burke

Milestone: 1.0

comment:3 Changed 14 years ago by James Burke

Resolution: fixed
Status: newclosed

This is fixed in the current trunk code for 0.9+. It actually might be fixed in 0.9 too, since all prefixes are copied to the release folder and operations happen on that path.

Note: See TracTickets for help on using tickets.