Skip to content

Commit c902c51

Browse files
committed
[bugfix] Fix invalid XQuery that can lead to err:XPTY0004 xs:string(/db/apps/monex/data) is not a sub-type of xs:anyURI
1 parent 3bc3270 commit c902c51

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/main/xar-resources/post-install.xql

+4-3
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@ declare namespace repo="http://exist-db.org/xquery/repo";
88
declare variable $target external;
99

1010
let $data := xmldb:create-collection($target, "data")
11+
let $col := xs:anyURI($data)
1112
return (
12-
sm:chown($data, "monex"),
13-
sm:chgrp($data, "monex"),
14-
sm:chmod($data, "rw-rw----")
13+
sm:chown($col, "monex"),
14+
sm:chgrp($col, "monex"),
15+
sm:chmod($col, "rw-rw----")
1516
),
1617
for $name in ("instances.xml", "notifications.xml")
1718
let $res := xs:anyURI($target || "/" || $name)

0 commit comments

Comments
 (0)