bugfix + notes...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2022-08-27 14:34:08 +03:00
parent 365b6ad319
commit 3d1598052a
2 changed files with 13 additions and 12 deletions

View File

@ -568,10 +568,13 @@ module.MetaStore = {
var store = Object.keys(this.substores ?? {}) var store = Object.keys(this.substores ?? {})
// normalize store paths to the given path... // normalize store paths to the given path...
.filter(function(p){ .filter(function(p){
return path.startsWith( p = root ?
root ?
'/'+p '/'+p
: p) }) : p
return path.startsWith(p)
&& (path[p.length] == null
|| path[p.length] == '/'
|| path[p.length] == '\\')})
.sort(function(a, b){ .sort(function(a, b){
return a.length - b.length }) return a.length - b.length })
.pop() .pop()

View File

@ -1,14 +1,12 @@
/********************************************************************** /**********************************************************************
* *
* *
* XXX BUG: for some reason pwiki.get('/TestPage').raw does nothing when * XXX BUG with non-BaseStore root, the paths under /Test/.. report
* the root store is not BaseStore... * recursion errors when rendered by /tree...
* ...the cause is: * /Test/tree -- works fine
* pwiki.store.substore('/TestPage') -> 'Test' * XXX BUG service pages (NotFoundError, RecursionError, ...) now print
* should be: * "[ native code ]" instead of the path and replacing @quote(..)
* pwiki.store.substore('/TestPage') -> undefined * with @source(..) breaks things...
* XXX BUG service pages (*Error) now print "[ native code ]" instead of
* the path and replacing @quote(..) with @source(..) breaks things...
* ...this seems to happen only if the root store is not * ...this seems to happen only if the root store is not
* MetaStore/BaseStore... * MetaStore/BaseStore...
* XXX BUG: .get(..) does not seem to resolve to <store>.next... * XXX BUG: .get(..) does not seem to resolve to <store>.next...