Currently, using the (in-directory …) sequence in a directory where there are 
unreadable directories causes a funny internal contract failure.

Suppose I have directory "/tmp/f", containing directory "sekrit" which I cannot 
read. Then this program:

#lang racket

(sequence->list (in-directory "/tmp/f"))

… produces this pair of errors:

. . plt/collects/racket/private/for.rkt:1857:28: directory-list: could not open 
directory
  path: /tmp/f/sekrit
  system error: Permission denied; errno=13
. . car: contract violation
  expected: pair?
  given: #<void>

The first one looks reasonable, but why wouldn't that error just abort the 
whole computation? It looks like there's a handler somewhere that eats this 
error but then tries to continue by passing #<void> rather than a list.

The docs don't seem to have anything to say about this.

Is this a bug?

John

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_________________________
  Racket Developers list:
  http://lists.racket-lang.org/dev

Reply via email to