Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#13234 closed defect (fixed)

compactPath does not function correctly if lastSegment != ".."

Reported by: tommahieu Owned by: Rawld Gill
Priority: high Milestone: 1.7
Component: Loader Version: 1.7.0b1
Keywords: Cc:
Blocked By: Blocking:

Description

compactPath does not update the lastSegment when compacting the path, resulting in erroneously compacted paths.

For example paths like "../../dojo/../../mytests" are compacted to "../mytests" instead of "../../../mytests". Such paths are apparently only passed to compactPath if they are added as modulepaths to the dojo/require config object.

patch in attachment

Attachments (1)

dojo.js.diff (413 bytes) - added by tommahieu 8 years ago.
compactPath patch (update lastSegment when popping off result array)

Download all attachments as: .zip

Change History (4)

Changed 8 years ago by tommahieu

Attachment: dojo.js.diff added

compactPath patch (update lastSegment when popping off result array)

comment:1 Changed 8 years ago by Rawld Gill

(In [25546]) fixed bug in compactPath (thanks tommahieu); added test; cleaned cruft; refs #13234; !strict

comment:2 Changed 8 years ago by Rawld Gill

Resolution: fixed
Status: newclosed

comment should've been fixed #13234

comment:3 Changed 8 years ago by bill

Milestone: tbd1.7
Note: See TracTickets for help on using tickets.