client: Don't try to load tox_save if it doesn't exist.
authorDavid Thompson <dthompson2@worcester.edu>
Tue, 15 Jul 2014 02:10:42 +0000 (22:10 -0400)
committerDavid Thompson <dthompson2@worcester.edu>
Tue, 15 Jul 2014 02:10:42 +0000 (22:10 -0400)
* examples/client.scm (load!): Test for tox_save file before loading.

examples/client.scm

index 9e6afbd..4064f04 100644 (file)
@@ -29,8 +29,9 @@
       (format #t "~a" (tox-save tox)))))
 
 (define (load!)
-  (display "Loading tox_save\n")
-  (tox-load tox (with-input-from-file "tox_save" read)))
+  (when (file-exists? "tox_save")
+    (display "Loading tox_save\n")
+    (tox-load tox (with-input-from-file "tox_save" read))))
 
 (define connected? #f)
 (define last-connection-attempt (current-time))