Ensure certificate directory exists
[elpher.git] / elpher.el
index 67eb790..5b0f132 100644 (file)
--- a/elpher.el
+++ b/elpher.el
@@ -529,8 +529,9 @@ unless NO-HISTORY is non-nil."
                                           '("gophers" "gemini")))
                              " [TLS encryption]"
                            ""))
-             (header (concat display-string
-                             (propertize tls-string 'face 'bold))))
+             (header (url-unhex-string
+                     (concat display-string
+                              (propertize tls-string 'face 'bold)))))
         (setq header-line-format header))))
 
 (defmacro elpher-with-clean-buffer (&rest args)
@@ -825,6 +826,8 @@ base for the installed key and certificate files."
 
 (defun elpher-list-existing-certificates ()
   "Return a list of the persistent certificates in `elpher-certificate-directory'."
+  (unless (file-directory-p elpher-certificate-directory)
+    (make-directory elpher-certificate-directory))
   (mapcar
    (lambda (file)
      (file-name-sans-extension file))