Permalink
Browse files

[win compatibility] Replacing windows path separator with /

  • Loading branch information...
1 parent 15ad1b6 commit e5bce17ed54447d702288311c1ee0499aefbab88 @vizio360 vizio360 committed Oct 4, 2012
Showing with 2 additions and 0 deletions.
  1. +2 −0 lib/modules.js
View
2 lib/modules.js
@@ -124,6 +124,8 @@ function loadModules(pkg, base){
return;
}
+ //replacing '\' with '/' for Windows based systems
+ module.filename = module.filename.replace(/\\/g,'/');
module.filename = module.filename.replace(base+'/', '');
module.filename.indexOf('/') > 0 && base != '.' && ( module.filename = module.filename.replace(base, '') );
module.id = module.filename.replace(/\.js$/,'');

0 comments on commit e5bce17

Please sign in to comment.