diff --git a/collects/racket/file.rkt b/collects/racket/file.rkt index 7851d0c361..4420d9a2e0 100644 --- a/collects/racket/file.rkt +++ b/collects/racket/file.rkt @@ -185,9 +185,9 @@ (raise-type-error 'call-with-file-lock/timeout "'shared or 'exclusive" kind)) (unless (and (procedure? thunk) (= (procedure-arity thunk) 0)) (raise-type-error 'call-with-file-lock/timeout "procedure (arity 0)" thunk)) - (unless (and (procedure? thunk) (= (procedure-arity thunk) 0)) + (unless (and (procedure? thunk) (= (procedure-arity failure-thunk) 0)) (raise-type-error 'call-with-file-lock/timeout "procedure (arity 0)" failure-thunk)) - (unless (path-string? lock-file) + (unless (or (not lock-file) (path-string? lock-file)) (raise-type-error 'call-with-file-lock/timeout "path-string? or #f" lock-file)) (unless (and (real? delay) (not (negative? delay))) (raise-type-error 'call-with-file-lock/timeout "non-negative real" delay))