From 6cb6f3fbf1fcc38b0765b0bf26227fa43f68b066 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Tue, 25 Feb 2014 13:33:17 -0700 Subject: [PATCH] raco exe: fix GUI executables for runnnig without a preference file A check for a default preferences file in the configuration directory failed, because there is no configuration directory to check. Closes PR 14370 --- racket/collects/racket/file.rkt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/racket/collects/racket/file.rkt b/racket/collects/racket/file.rkt index c27181d4e9..984c7c528f 100644 --- a/racket/collects/racket/file.rkt +++ b/racket/collects/racket/file.rkt @@ -419,9 +419,9 @@ ;; in the configuration directory: (values (let* ([d (find-config-dir)] - [f (and d (build-path d "racket-prefs.rktd"))]) - (if (file-exists? f) - f + [c-f (and d (build-path d "racket-prefs.rktd"))]) + (if (and c-f (file-exists? c-f)) + c-f ;; Trigger a filesystem error: (call-with-input-file* f void))) #f))))))])