From c81222e4c8e724f183379241ee496e26e6f4a3cb Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Thu, 11 Aug 2011 13:23:24 -0600 Subject: [PATCH] fix `call-with-file-lock/timeout' checking --- collects/racket/file.rkt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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))