Skip to content

Commit 3ba391e

Browse files
committed
[fix] calls to fn:filter in repair module
fn:filter was called using the deprecated signature where the arguments order was flipped. fixes #3370
1 parent 1791c26 commit 3ba391e

File tree

1 file changed

+3
-3
lines changed
  • extensions/modules/expathrepo/src/main/resources/org/exist/xquery/modules/expathrepo

1 file changed

+3
-3
lines changed

extensions/modules/expathrepo/src/main/resources/org/exist/xquery/modules/expathrepo/repair.xql

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ declare %private function repair:repair-callback($collection as xs:anyURI, $incl
8585
};
8686

8787
declare function repair:is-installed($name as xs:string) as xs:boolean {
88-
exists(filter(function($pkg) { $pkg = $name }, repo:list()))
88+
exists(filter(repo:list(), function($pkg) { $pkg = $name }))
8989
};
9090

9191
(:~ Scan a collection tree recursively starting at $root. Call $func once for each collection found :)
@@ -97,9 +97,9 @@ declare %private function repair:scan-collections($root as xs:anyURI, $func as f
9797
};
9898

9999
declare %private function repair:find-resources-to-zip($collection as xs:anyURI) {
100-
filter(function($name) {
100+
filter(xmldb:get-child-resources($collection), function($name) {
101101
$name = ("expath-pkg.xml", "repo.xml", "exist.xml") or starts-with($name, "icon")
102-
}, xmldb:get-child-resources($collection))
102+
})
103103
};
104104

105105
declare %private function repair:resources-to-zip($expathConf as element(expath:package), $collection as xs:anyURI) {

0 commit comments

Comments
 (0)