summaryrefslogtreecommitdiff
path: root/helm-locate.el
diff options
context:
space:
mode:
authorThierry Volpiatto <thierry.volpiatto@gmail.com>2018-02-04 07:32:07 +0100
committerThierry Volpiatto <thierry.volpiatto@gmail.com>2018-02-04 07:32:07 +0100
commit41c85d466a04061dc39a55eef2eda9e84bcb3b15 (patch)
tree753dd8276e0967bd4753277c3679f7a36861b116 /helm-locate.el
parent6c27ac15aa40da6cf7f736ea6451cc9d4bfab490 (diff)
Fix abbreviated paths (#1962)
not expanding inside single quotes. * helm-locate.el (helm-locate-create-db-default-function): Do it. (helm-locate-with-db): Do it.
Diffstat (limited to 'helm-locate.el')
-rw-r--r--helm-locate.el10
1 files changed, 8 insertions, 2 deletions
diff --git a/helm-locate.el b/helm-locate.el
index 9d12c0ee..fab2aa9e 100644
--- a/helm-locate.el
+++ b/helm-locate.el
@@ -180,7 +180,8 @@ fall back to `default-directory' if FROM-FF is nil."
"Default function used to create a locale locate db file.
Argument DB-NAME name of the db file.
Argument DIRECTORY root of file system subtree to scan."
- (format helm-locate-create-db-command db-name directory))
+ (format helm-locate-create-db-command
+ db-name (expand-file-name directory)))
(defvar helm-locate-create-db-function
#'helm-locate-create-db-default-function
@@ -266,7 +267,12 @@ See also `helm-locate'."
;; marked directories by error.
(cl-loop for i in db
unless (file-directory-p i)
- collect i) ":"))
+ ;; expand-file-name to resolve
+ ;; abbreviated fnames which
+ ;; doesn't expand inside single
+ ;; quotes i.e. '%s'.
+ collect (expand-file-name i))
+ ":"))
helm-locate-command)
(if (and helm-locate-fuzzy-match
(not (string-match-p "\\`locate -b" helm-locate-command)))