Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Fix to make express-namespace work on Windows #15

Merged
merged 1 commit into from

2 participants

@ForbesLindesay

Windows uses '\' instead of '/' in join, so we need to replace '\' with '/' in our getter for current namespace.

@tj tj merged commit de62676 into expressjs:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 31, 2012
  1. @ForbesLindesay
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 2 deletions.
  1. +1 −2  index.js
View
3  index.js
@@ -1,4 +1,3 @@
-
/*!
* Express - Contrib - namespace
* Copyright(c) 2010 TJ Holowaychuk <tj@vision-media.ca>
@@ -39,7 +38,7 @@ exports.namespace = function(path, fn){
*/
exports.__defineGetter__('currentNamespace', function(){
- return join.apply(this, this._ns).replace(/\/$/, '') || '/';
+ return join.apply(this, this._ns).replace(/\\/g, '/').replace(/\/$/, '') || '/';
});
/**
Something went wrong with that request. Please try again.