From 41600d3f7e3ef7d15bbd40126576c615e5c3093a Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Tue, 13 Sep 2022 11:54:57 +0300 Subject: [PATCH] cleanup... Signed-off-by: Alex A. Naanou --- pwiki/store/base.js | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/pwiki/store/base.js b/pwiki/store/base.js index c252a53..8cc427c 100755 --- a/pwiki/store/base.js +++ b/pwiki/store/base.js @@ -340,7 +340,8 @@ module.BaseStore = { path .replace(/^\/|\/$/g, '') .replace(/\//g, '\\/') - .replace(/\*\*/g, '.*') + //.replace(/\*\*/g, '.*') + .replace(/([\\\/]?)\*\*/g, '($1.*)') .replace(/(?<=^|[\\\/]+|[^.])\*/g, '[^\\/]*') }(?=[\\\\\/]|$)`) /*/ XXX CACHED.... @@ -358,19 +359,12 @@ module.BaseStore = { // skip metadata paths... if(p.includes('*')){ return res } - // XXX HIDE .hide_paths + /*/ XXX HIDE this is wrong -- need to check for + // hidden paths within the match... if(pwpath.basename(p)[0] == '.' - /*/ - if((pwpath.basename(p)[0] == '.' - // XXX CACHE this??? - || (that.hide_paths - && that.hide_paths - .reduce(function(res, h){ - return res === true - || p.startsWith(h) }, false))) - //*/ && !all){ return res } + //*/ var m = p.match(pattern) m && (!strict