Permalink
Browse files

normalize path separator.

  • Loading branch information...
1 parent 6b27f40 commit c316752e9a3d46cfe97bf84b23bbdfbcb49a8fbb @taichi taichi committed Oct 11, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/fs.js
View
@@ -54,7 +54,7 @@ var Mock = function(structure) {
// TODO(vojta): convert structure to contain only instances of File/Directory (not primitives)
var getPointer = function(path, pointer) {
- var parts = path.replace(/\/$/, '').split('/').slice(1);
+ var parts = path.replace(/\\/g, '/').replace(/\/$/, '').split('/').slice(1);
while (parts.length) {
if (!pointer[parts[0]]) break;

0 comments on commit c316752

Please sign in to comment.