Permalink
Browse files

Merge pull request #27 from ianoxley/relativewebroot

Add support for relative webroot paths.
  • Loading branch information...
2 parents b030d65 + a18d4bc commit 9355291516351796e5dcf1192746ef706d35bae3 @felixge committed Jun 4, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/paperboy.js
View
@@ -6,7 +6,8 @@ var
exports.filepath = function (webroot, url) {
- var pathSep=process.platform =='win32' ? '\\' : '/'
+ webroot = path.resolve(webroot || '.');
+ var pathSep=process.platform =='win32' ? '\\' : '/';
// Unescape URL to prevent security holes
url = decodeURIComponent(url);
// Strip nullbytes (they can make us believe that the file extension isn't the one it really is)

0 comments on commit 9355291

Please sign in to comment.