Skip to content

Commit

Permalink
Use file-truename when caching current file
Browse files Browse the repository at this point in the history
  • Loading branch information
colonelpanic8 committed Apr 8, 2015
1 parent b2d8a4d commit 2854d9f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ to behave like `helm-find-files`, such as multifile selection and opening or del
buffers by name
* New `defcustom` `projectile-globally-ignored-file-suffixes` allows
you to globally ignore files with particular extensions
* Use file-truename when caching filenames to prevent
duplicate/symlinked filepaths from appearing when opening a project
file,

### Changes

Expand Down
2 changes: 1 addition & 1 deletion projectile.el
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@ The cache is created both in memory and on the hard drive."
"Add the currently visited file to the cache."
(interactive)
(let* ((current-project (projectile-project-root))
(abs-current-file (buffer-file-name (current-buffer)))
(abs-current-file (file-truename (buffer-file-name (current-buffer))))
(current-file (file-relative-name abs-current-file current-project)))
(when (gethash (projectile-project-root) projectile-projects-cache)
(unless (or (projectile-file-cached-p current-file current-project)
Expand Down

0 comments on commit 2854d9f

Please sign in to comment.