summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorVivien Kraus <vivien@planete-kraus.eu>2021-06-26 23:15:46 +0200
committerVivien Kraus <vivien@planete-kraus.eu>2021-06-27 00:17:52 +0200
commit7672491a3374d0dce45a0a9db2ab2cc4a7dd2944 (patch)
tree3980a7e538c73feeb986f173d1ec3da745949b6b /src
parent1b7a485bbd05802432539984f3df078b5b8134ac (diff)
ACL: handle non-existing resources
Diffstat (limited to 'src')
-rw-r--r--src/scm/webid-oidc/server/resource/wac.scm11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/scm/webid-oidc/server/resource/wac.scm b/src/scm/webid-oidc/server/resource/wac.scm
index e482ce4..b9959f9 100644
--- a/src/scm/webid-oidc/server/resource/wac.scm
+++ b/src/scm/webid-oidc/server/resource/wac.scm
@@ -183,7 +183,16 @@
(with-session
(lambda (content-type contained static-content create delete)
(define (wac-check-recursive path check-default?)
- (receive (main-etag auxiliary) (read-path path)
+ (receive (main-etag auxiliary)
+ (with-exception-handler
+ (lambda (error)
+ (unless (path-not-found? error)
+ (raise-exception error))
+ (values #f '()))
+ (lambda ()
+ (read-path path))
+ #:unwind? #t
+ #:unwind-for-type &path-not-found)
(let ((acl-etag (assoc-ref auxiliary acl-aux)))
(if acl-etag
(with-rdf-source