Skip to content

Commit

Permalink
Fix issue with file paths on Windows.
Browse files Browse the repository at this point in the history
  • Loading branch information
chukonu committed Mar 20, 2015
1 parent 2686426 commit c312cdc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/loader.js
Expand Up @@ -35,7 +35,7 @@ function loadfiles(root, subPath, paths) {
file = path.join(dirPath, '/', file);
if (fs.statSync(file).isFile()) {
if (path.extname(file) === '.js') {
paths[file.replace(new RegExp('^' + path.join(path.resolve(root), '/')), '').replace(/.js$/, '').toLowerCase()] = file;
paths[path.basename(file, '.js').toLowerCase()] = file;
}
} else if (fs.statSync(file).isDirectory()) {
loadfiles(root, file, paths);
Expand Down

0 comments on commit c312cdc

Please sign in to comment.