Make certain that path is relative before joining it to relativeTo#1547
Make certain that path is relative before joining it to relativeTo#1547hueniverse merged 10 commits intohapijs:masterfrom andrewburgess:issue-1545
Conversation
|
Need tests. Also was this tested with symbolic links on linux? |
|
I'll add some tests. In terms of symbolic links, I don't believe it should matter because the Path module primarily deals with string manipulation of paths. It wouldn't follow a symbolic link in this case. |
|
Node is stupid about symlinks so want to make sure. |
|
Understandable. https://github.com/joyent/node/blob/master/lib/path.js#L349 https://github.com/joyent/node/blob/master/lib/path.js#L318 Regardless, I'll put some tests together to make sure that the paths resolve correctly. |
…liable Also updated the schema validation for relativeTo on the server to allow for Windows based paths
|
Ok, I think I have things back up to parity with the builds before mine on There are still some additional areas where pathing can be fixed for Windows based systems. Might be able to augment with some of the changes in #1505 without the included dependency on another module. |
Make certain that path is relative before joining it to relativeTo
delete now superfluous 'remove drive letter of project_dir on windows'. before this, also tests fail on windows at integration/handle_404 (expected 404 got 200). with this fix tests run fine. this line was added in feb 2014. the hapi project fixed this shortly after in march/april. Remove assumption that all absolute paths start with '/' hapijs/hapi#1505 Make certain that path is relative before joining it to relativeTo hapijs/hapi#1547
This should fix the pathing logic for the File handler on Windows based systems.
Fixes #1545