rejeep / f.el

Modern API for working with files and directories in Emacs
GNU General Public License v3.0
685 stars 69 forks source link

Make f-directories optionally ignore permission errors #76

Closed mattiasb closed 7 years ago

mattiasb commented 7 years ago

Hi!

I constructed the following little helper function to help me fill up my projectile index just now:

(defun my/find-git-projects (dir)
  "Find all git projects under DIR."
  (mapcar #'f-dirname
          (f-directories "~/Documents/"
                         (lambda () (equal (f-filename dir) ".git"))
                         t)))

Unfortunately I get the following error:

f--collect-entries: Opening directory: Permission denied, c:/Users/mattias.bengtsson/AppData/Local/Application Data

Would it be possible to teach f-directories to optionally ignore directories it can't reach due to permissions instead of erroring out?

rejeep commented 7 years ago

No, I think this is basically the same issue as https://github.com/rejeep/f.el/pull/73

mattiasb commented 7 years ago

Indeed it is.