mirror of
https://github.com/flynx/pWiki.git
synced 2025-12-21 02:21:40 +00:00
cleanup...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
af9caa5afb
commit
41600d3f7e
@ -340,7 +340,8 @@ module.BaseStore = {
|
|||||||
path
|
path
|
||||||
.replace(/^\/|\/$/g, '')
|
.replace(/^\/|\/$/g, '')
|
||||||
.replace(/\//g, '\\/')
|
.replace(/\//g, '\\/')
|
||||||
.replace(/\*\*/g, '.*')
|
//.replace(/\*\*/g, '.*')
|
||||||
|
.replace(/([\\\/]?)\*\*/g, '($1.*)')
|
||||||
.replace(/(?<=^|[\\\/]+|[^.])\*/g, '[^\\/]*')
|
.replace(/(?<=^|[\\\/]+|[^.])\*/g, '[^\\/]*')
|
||||||
}(?=[\\\\\/]|$)`)
|
}(?=[\\\\\/]|$)`)
|
||||||
/*/ XXX CACHED....
|
/*/ XXX CACHED....
|
||||||
@ -358,19 +359,12 @@ module.BaseStore = {
|
|||||||
// skip metadata paths...
|
// skip metadata paths...
|
||||||
if(p.includes('*')){
|
if(p.includes('*')){
|
||||||
return res }
|
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] == '.'
|
||||||
/*/
|
|
||||||
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){
|
&& !all){
|
||||||
return res }
|
return res }
|
||||||
|
//*/
|
||||||
var m = p.match(pattern)
|
var m = p.match(pattern)
|
||||||
m
|
m
|
||||||
&& (!strict
|
&& (!strict
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user