Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

normalize path separator.

  • Loading branch information...
commit c316752e9a3d46cfe97bf84b23bbdfbcb49a8fbb 1 parent 6b27f40
@taichi taichi authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/fs.js
View
2  lib/fs.js
@@ -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;
Please sign in to comment.
Something went wrong with that request. Please try again.