In my vault I have two files named aaa.md and not-the-aaa.md.
If in a third file called xxx.md I put a link to [aaa](aaa.md) and I follow it with obsidian-follow-link-at-point, I am not redirected to aaa.md but I'm promped so to choose which file to follow because I have two files with the same suffix aaa.md in my directory.
I think this shouldn't happen, a link should bring me to a specific file.
I think this happens because of this function:
(defun obsidian--match-files (f all-files)
"Filter ALL-FILES to return list with same name as F."
(-filter (lambda (el) (s-ends-with-p f el)) all-files))
that match the files using the suffix, while it should probably use the full file name like this:
(defun obsidian--match-files (f all-files)
"Filter ALL-FILES to return list with same name as F."
(-filter (lambda (el) (s-equals-p f (obsidian--file-relative-name el))) all-files))
Hi, I think I found a bug.
In my vault I have two files named
aaa.md
andnot-the-aaa.md
. If in a third file calledxxx.md
I put a link to[aaa](aaa.md)
and I follow it withobsidian-follow-link-at-point
, I am not redirected toaaa.md
but I'm promped so to choose which file to follow because I have two files with the same suffixaaa.md
in my directory.I think this shouldn't happen, a link should bring me to a specific file.
I think this happens because of this function:
that match the files using the suffix, while it should probably use the full file name like this:
What do you think about it?