diff --git a/scheme/lib/ls.scm b/scheme/lib/ls.scm index cabf038..cf1b6c0 100644 --- a/scheme/lib/ls.scm +++ b/scheme/lib/ls.scm @@ -75,6 +75,13 @@ ; a FILE is a pair whose car is a file-name and whose cdr is ; either its file-info-object or #f (if not needed) ; a INFO is a file-info-object + + ;; This is actually a hack for the benefits of systems using AFS, + ;; mainly to enable anonymous-upload directories: We don't list + ;; a directory unless the Unix permissions would allow us to. + (if (not (file-readable? directory)) + (errno-error errno/perm directory-files directory)) + (let* ((directory (file-name-as-directory directory)) (substantial-directory (string-append directory ".")) (file-names (directory-files substantial-directory all?)))