Skip to content

Commit

Permalink
Uses less side-effects and handle errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
ralt committed Dec 5, 2014
1 parent 5c74f83 commit e17c2f0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions lispkit.lisp
Expand Up @@ -40,6 +40,7 @@
(leave-gtk-main))))
(load-url *default-page* browser)
(gtk-widget-hide entry)
(ensure-cookies-folder-exists *cookie-path-dir*)
;; TODO - Add error handling to this.
(load-rc-file)
(gtk-window-maximize window)
Expand Down
5 changes: 4 additions & 1 deletion settings.lisp
Expand Up @@ -4,4 +4,7 @@
(defparameter *cookie-type* :webkit-cookie-persistent-storage-text)
(defparameter *cookie-accept-policy* :webkit-cookie-policy-accept-always)

(ensure-directories-exist *cookie-path-dir*)
(defun ensure-cookies-folder-exists (path)
"Ensures that the cookies folder exists."
(handler-case (ensure-directories-exist path)
(file-error () (format *error-output* "Unable to ensure that the cookies folder ~s exists." path))))

0 comments on commit e17c2f0

Please sign in to comment.