Skip to content

Commit

Permalink
[bugfix] Fix invalid XQuery that can lead to err:XPTY0004 xs:string(/…
Browse files Browse the repository at this point in the history
…db/apps/monex/data) is not a sub-type of xs:anyURI
  • Loading branch information
adamretter committed Nov 30, 2022
1 parent 3bc3270 commit c902c51
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/main/xar-resources/post-install.xql
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@ declare namespace repo="http://exist-db.org/xquery/repo";
declare variable $target external;

let $data := xmldb:create-collection($target, "data")
let $col := xs:anyURI($data)
return (
sm:chown($data, "monex"),
sm:chgrp($data, "monex"),
sm:chmod($data, "rw-rw----")
sm:chown($col, "monex"),
sm:chgrp($col, "monex"),
sm:chmod($col, "rw-rw----")
),
for $name in ("instances.xml", "notifications.xml")
let $res := xs:anyURI($target || "/" || $name)
Expand Down

0 comments on commit c902c51

Please sign in to comment.