We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f140b2d commit 58c07efCopy full SHA for 58c07ef
1 file changed
gui-lib/framework/private/autosave.rkt
@@ -62,9 +62,11 @@
62
;; -> autosave-toc
63
;; assumes in the dynamic-extent of the thunk passed to with-autosave-filesystem-lock
64
(define (get-autosave-toc-content)
65
- (call-with-input-file (current-toc-path)
66
- (λ (port)
67
- (read port))))
+ (define path (current-toc-path))
+ (cond
+ [(file-exists? path)
68
+ (call-with-input-file path read)]
69
+ [else '()]))
70
71
;; autosave-toc -> void
72
0 commit comments