Skip to content

Commit

Permalink
Only call file-truename in lsp-find-session-folder
Browse files Browse the repository at this point in the history
  • Loading branch information
Corentin committed Jul 16, 2023
1 parent fdc113f commit b1083eb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lsp-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -1306,8 +1306,8 @@ FORMAT and ARGS i the same as for `message'."
(defalias 'lsp-file-local-name 'file-local-name)

(defun lsp-f-canonical (file-name)
"Return the canonical FILE-NAME, without a trailing slash (follow symlink)."
(directory-file-name (file-truename (expand-file-name file-name))))
"Return the canonical FILE-NAME, without a trailing slash."
(directory-file-name (expand-file-name file-name)))

(defalias 'lsp-canonical-file-name 'lsp-f-canonical)

Expand Down Expand Up @@ -8863,7 +8863,7 @@ Select action: "

(defun lsp-find-session-folder (session file-name)
"Look in the current SESSION for folder containing FILE-NAME."
(let ((file-name-canonical (lsp-f-canonical file-name)))
(let ((file-name-canonical (file-truename file-name)))
(->> session
(lsp-session-folders)
(--filter (and (lsp--files-same-host it file-name-canonical)
Expand Down

0 comments on commit b1083eb

Please sign in to comment.