branch: externals/beardbolt
commit ea3e0e4257f653df404bb0d4300f7e8e55f97e17
Author: Jay Kamat <[email protected]>
Commit: Jay Kamat <[email protected]>
Fix incorrect matching of filenames for compile_commands.json
---
rmsbolt.el | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/rmsbolt.el b/rmsbolt.el
index 328681852d..f15dd8a6d3 100644
--- a/rmsbolt.el
+++ b/rmsbolt.el
@@ -775,13 +775,13 @@ toolchain."
(when-let ((json-object-type 'alist)
(json-array-type 'vector)
(cmds (json-read-file comp-cmds))
- (stripped-file (file-name-nondirectory file))
(entry (cl-find-if
(lambda (elt)
- (string=
- stripped-file
- (file-name-nondirectory
- (alist-get 'file elt ""))))
+ (file-equal-p
+ file
+ (expand-file-name
+ (alist-get 'file elt "")
+ (alist-get 'directory elt ""))))
cmds))
(dir (alist-get 'directory entry))
(cmd (alist-get 'command entry)))