Skip to content

Commit

Permalink
Recognize both *nix and Windows abs paths
Browse files Browse the repository at this point in the history
  • Loading branch information
mde committed Jun 2, 2019
1 parent 720ab7f commit 8a6abe4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/ejs.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,10 @@ function getIncludePath(path, options) {
var includePath;
var filePath;
var views = options.views;
var match = /^[A-Za-z]+:\\|^\//.exec(path);

// Abs path
if (path.charAt(0) == '/') {
if (match && match.length) {
includePath = exports.resolveInclude(path.replace(/^\/*/,''), options.root || '/', true);
}
// Relative paths
Expand Down

0 comments on commit 8a6abe4

Please sign in to comment.