Skip to content

Commit

Permalink
Split path by path.sep instead of slash
Browse files Browse the repository at this point in the history
  • Loading branch information
felixfbecker authored and haoxin committed Oct 23, 2015
1 parent 2158790 commit 75cdbe5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ var basename = path.basename;
var extname = path.extname;
var resolve = path.resolve;
var parse = path.parse;
var sep = path.sep;
var fs = require('mz/fs');

/**
Expand Down Expand Up @@ -107,7 +108,7 @@ function send(ctx, path, opts) {
*/

function isHidden(root, path) {
path = path.substr(root.length).split('/');
path = path.substr(root.length).split(sep);
for(var i = 0; i < path.length; i++) {
if(path[i][0] === '.') return true;
}
Expand Down

0 comments on commit 75cdbe5

Please sign in to comment.