Add hack for the benefits of ftpds on AFS directories, to enable
anonymous-upload directories: We don't list a directory unless the Unix permissions would allow us to.
This commit is contained in:
parent
cca616721a
commit
0db253e1a1
|
@ -75,6 +75,13 @@
|
||||||
; a FILE is a pair whose car is a file-name and whose cdr is
|
; 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)
|
; either its file-info-object or #f (if not needed)
|
||||||
; a INFO is a file-info-object
|
; 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))
|
(let* ((directory (file-name-as-directory directory))
|
||||||
(substantial-directory (string-append directory "."))
|
(substantial-directory (string-append directory "."))
|
||||||
(file-names (directory-files substantial-directory all?)))
|
(file-names (directory-files substantial-directory all?)))
|
||||||
|
|
Loading…
Reference in New Issue