You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ripple.apache.org by br...@apache.org on 2013/07/08 23:00:30 UTC

[23/28] git commit: This file path should be joined properly, in consideration of Windows.

This file path should be joined properly, in consideration of Windows.

I also added a path.resolve call to return a consistent, absolute
file path (for form).


Project: http://git-wip-us.apache.org/repos/asf/incubator-ripple/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ripple/commit/dc126033
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ripple/tree/dc126033
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ripple/diff/dc126033

Branch: refs/heads/master
Commit: dc1260333e34504d8630488d5230bb7129524290
Parents: eb098f2
Author: Brent Lintner <br...@gmail.com>
Authored: Tue Jun 25 12:47:52 2013 -0400
Committer: Brent Lintner <br...@gmail.com>
Committed: Fri Jul 5 17:22:57 2013 -0400

----------------------------------------------------------------------
 lib/server/emulate/hosted.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ripple/blob/dc126033/lib/server/emulate/hosted.js
----------------------------------------------------------------------
diff --git a/lib/server/emulate/hosted.js b/lib/server/emulate/hosted.js
index ab8d6f0..11631e8 100644
--- a/lib/server/emulate/hosted.js
+++ b/lib/server/emulate/hosted.js
@@ -145,7 +145,7 @@ function localInjection(opts) {
             //first matching file
             var fullPath = opts.path.reduce(function (match, curr) {
                 if (match) return match;
-                var file = curr + (req.path.match(/\/$/) ? req.path + "/index.html" : req.path);
+                var file = path.resolve(curr + (req.path.match(/\/$/) ? path.join(req.path, "index.html") : req.path));
                 return fs.existsSync(file) ? file : match;
             }, null);