Generate "none" for empty afs-permissions.

This commit is contained in:
Martin Gasbichler 2003-02-22 07:51:44 +00:00
parent 4e7d93b126
commit c73875d993
1 changed files with 9 additions and 7 deletions

View File

@ -50,12 +50,14 @@
s))
(define (afs-permissions->string afs-perms)
(fold (lambda (perm s)
(if (enum-set-member? afs-perms perm)
(string-append s (string (afs-permission->char perm)))
s))
""
(vector->list the-afs-permissions)))
(if (null? (enum-set->list afs-perms))
"none"
(fold (lambda (perm s)
(if (enum-set-member? afs-perms perm)
(string-append s (string (afs-permission->char perm)))
s))
""
(vector->list the-afs-permissions))))
(define all-afs-permissions
(make-afs-permissions (map char->afs-permission (string->list "rlidwka"))))