From 363a41451a7cc6e66fe8f4bf189cd6ed697b8d1b Mon Sep 17 00:00:00 2001 From: Sven Slootweg Date: Sun, 17 Apr 2016 19:37:48 +0200 Subject: [PATCH] Fix regular expression for Windows filesystem root --- src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index a4fc1d5..4f88c35 100644 --- a/src/index.js +++ b/src/index.js @@ -26,7 +26,7 @@ let defaultCheckers = { function reachedRoot(candidatePath) { /* Returns true if we hit the root of the filesystem; like / or C:\ */ - return /^(?:\/|a-z:\\)$/i.test(candidatePath); + return /^(?:\/|[a-z]:\\)$/i.test(candidatePath); } module.exports = function(options) {