Skip to content

Commit

Permalink
Use file-truename to check for file existence
Browse files Browse the repository at this point in the history
This removes the dependency on the regexp capture group.

Fixes #18
  • Loading branch information
fpiper committed Oct 8, 2020
1 parent 1324d3f commit c8f7995
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions git-annex.el
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 128,9 @@ otherwise you will have to commit by hand."
"Face name used to hide a git-annex'd file's annex path.")

(defun git-annex-lookup-file (limit)
(cl-loop while (re-search-forward " -> \\(.*\\.git/annex/. \\)" limit t)
(cl-loop while (re-search-forward " -> .*\\.git/annex/. " limit t)
if (file-exists-p
(expand-file-name (match-string 1) (file-name-directory (dired-get-filename nil t))))
(file-truename (dired-get-filename nil t)))
return t))

(eval-after-load "dired"
Expand Down

0 comments on commit c8f7995

Please sign in to comment.