Helm: Lookup Btrfs subvolumes.

master
Pierre Neidhardt 2020-05-05 14:32:00 +02:00
parent d8b1dde558
commit d49e1b65df
1 changed files with 4 additions and 1 deletions

View File

@ -277,7 +277,10 @@ With prefix argument, UPDATE the databases with custom uptions thanks to the
(let ((user-db (expand-file-name "~/.cache/locate.db"))
(media-dbs (apply 'append
(mapcar
(lambda (root) (ignore-errors (file-expand-wildcards (concat root "/*/locate.db"))))
(lambda (root)
(append (ignore-errors (file-expand-wildcards (concat root "/*/locate.db")))
;; Also lookup subfolders; useful when root has snapshots (.e.g Btrfs).
(ignore-errors (file-expand-wildcards (concat root "/*/*/locate.db")))))
(list (concat "/run/media/" (user-login-name))
(concat "/media/" (user-login-name))
"/media")))))