Improve last change to auth-source-pass
* lisp/auth-source-pass.el (auth-source-pass-search): Remove redundant expand-file-name. * test/lisp/auth-source-pass-tests.el (auth-source-pass--with-store): Bind auth-source-pass-filename to an existing directory to satisfy the new guard in auth-source-pass-search (bug#76323).
This commit is contained in:
@@ -85,7 +85,7 @@ HOST, USER, PORT, REQUIRE, and MAX."
|
|||||||
((null host)
|
((null host)
|
||||||
;; Do not build a result, as none will match when HOST is nil
|
;; Do not build a result, as none will match when HOST is nil
|
||||||
nil)
|
nil)
|
||||||
((not (file-directory-p (expand-file-name auth-source-pass-filename)))
|
((not (file-directory-p auth-source-pass-filename))
|
||||||
;; Do nothing if the password-store folder doesn't exist.
|
;; Do nothing if the password-store folder doesn't exist.
|
||||||
nil)
|
nil)
|
||||||
(auth-source-pass-extra-query-keywords
|
(auth-source-pass-extra-query-keywords
|
||||||
|
|||||||
@@ -91,7 +91,10 @@ This function is intended to be set to `auth-source-debug'."
|
|||||||
((symbol-function 'auth-source-pass-entries) (lambda () (mapcar #'car ,store))))
|
((symbol-function 'auth-source-pass-entries) (lambda () (mapcar #'car ,store))))
|
||||||
(let ((auth-source-debug #'auth-source-pass--debug)
|
(let ((auth-source-debug #'auth-source-pass--debug)
|
||||||
(auth-source-pass--debug-log nil)
|
(auth-source-pass--debug-log nil)
|
||||||
(auth-source-pass--parse-log nil))
|
(auth-source-pass--parse-log nil)
|
||||||
|
;; Any existing directory will do, since we shouldn't do I/O
|
||||||
|
;; except for the guard in `auth-source-pass-search'.
|
||||||
|
(auth-source-pass-filename default-directory))
|
||||||
,@body)))
|
,@body)))
|
||||||
|
|
||||||
(defun auth-source-pass--explain-match-entry-p (entry hostname &optional user port)
|
(defun auth-source-pass--explain-match-entry-p (entry hostname &optional user port)
|
||||||
|
|||||||
Reference in New Issue
Block a user