-
Notifications
You must be signed in to change notification settings - Fork 46
Description
When I get api/specs/raw json data, it contains local file paths instead or urls. I digged through the code a bit and found out why it is happening. In file-tree/index.js there is a line:
urlForJson = _specPath.replace(normalizedPathToApp, '');The issue is happening when _specPath is different from normalizedPathToApp, for example when drive letter has different case:
_specPath = c:/dev/node_projects/sourcejs/docs/auth/readme.md
normalizedPathToApp = C:/dev/node_projects/sourcejs
It could happen because var normalizedPathToApp = global.pathToApp.replace(/\\/g, '/'); and global.pathToApp = __dirname;. Funny enough but when node started via powershell, __dirname will return path with drive letter in uppercase, while when started with cmd, node will return path with lowercase... :S
So I guess there should be conversion to lowercase?