From 01f4c39cf98445bb33b27e88e4bae4d5bf45950e Mon Sep 17 00:00:00 2001 From: Myk Melez Date: Sun, 28 Dec 2014 22:53:59 -0800 Subject: [PATCH] require filter to match from beginning to end --- midp/fs.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/midp/fs.js b/midp/fs.js index 9cc212e5..d1fbf9fe 100644 --- a/midp/fs.js +++ b/midp/fs.js @@ -330,7 +330,8 @@ function(jPath, filterArray, includeHidden) { // Transform * to .+ filter = filter.replace(/\*/g, ".*"); - filter += "$"; + // Require filter to match from the beginning to the end. + filter = "^" + filter + "$"; } fs.list(path, function(error, files) {