#16716 closed defect (fixed)
js-doc-parse windows paths - / vs \
Reported by: | lzboron | Owned by: | Colin Snover |
---|---|---|---|
Priority: | undecided | Milestone: | 1.9 |
Component: | Doc parser | Version: | 1.8.3 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
I tried to run js-doc-parse with my app package, that is not placed next to dojo, so I declared it explicitly in dojo config. When I run parser, I get error message saying that my modules are outside of defined packages. I investigated this issue and found out, that problem is in lib/File.js.
This code assumes that path should end with '/'
if (pathPrefix.charAt(pathPrefix.length - 1) !== '/') { pathPrefix += '/'; }
But this path was normalized by pathUtil.normalize, which uses '\' on windows (http://nodejs.org/api/path.html#path_path_normalize_p). This means that '/' is added to path and it will end with '\/'.
I think that this check should also consider possibility that path ends with '\'.
Change History (3)
comment:1 Changed 9 years ago by
Owner: | set to Colin Snover |
---|---|
Status: | new → assigned |
comment:2 Changed 9 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:3 Changed 9 years ago by
Component: | General → Doc parser |
---|---|
Milestone: | tbd → 1.9 |
Note: See
TracTickets for help on using
tickets.
This was fixed. Please report js-doc-parse bugs on the js-doc-parse bug tracker, as it is a separate project.