summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kasi-auth-source.el7
1 files changed, 4 insertions, 3 deletions
diff --git a/kasi-auth-source.el b/kasi-auth-source.el
index fa9f629..5d720cc 100644
--- a/kasi-auth-source.el
+++ b/kasi-auth-source.el
@@ -27,8 +27,9 @@
27;; (auth-source-forget-all-cached) 27;; (auth-source-forget-all-cached)
28;; 28;;
29;; The kasi file path (e.g. "category/file") is matched against the 29;; The kasi file path (e.g. "category/file") is matched against the
30;; `:host' parameter. The `:user' parameter can optionally be used to 30;; `:host' parameter only if it contains a "/" (i.e. looks like a
31;; filter by the username stored in the kasi entry. 31;; directory path). Otherwise the `:host' is ignored and the search
32;; falls back to matching by `:user'.
32 33
33;;; Code: 34;;; Code:
34 35
@@ -78,7 +79,7 @@ optional filters."
78 (dolist (file files) 79 (dolist (file files)
79 (message "kasi-auth-source: checking %s" file) 80 (message "kasi-auth-source: checking %s" file)
80 (when-let* ((short-name (kasi--filename-short file)) 81 (when-let* ((short-name (kasi--filename-short file))
81 ((or (not host) (string= short-name host))) 82 ((or (not host) (not (string-match-p "/" host)) (string= short-name host)))
82 (entry-user (kasi--get file 'username)) 83 (entry-user (kasi--get file 'username))
83 (entry-email (kasi--get file 'email)) 84 (entry-email (kasi--get file 'email))
84 ((or (not user) (string= entry-user user))) 85 ((or (not user) (string= entry-user user)))