Links need to be updated when a new file with existing name is added to the vault to maintain consistency

Links may need to be updated when a new file is added to the vault that has the same name of a file already present in the vault to maintain consistency. This is important in shortest path mode as it currently may lead to link hijacking.

Assume I have /note.md with a link to [[image.jpg]] and the image is in /assets/image.jpg.
If I add a new image as /image.jpg, the link in /note.md will be silently redirected to this new image.

Therefore, when anything is added to vault, Obsidian should check the links for consistency and update them if necessary.

3 Likes

Should check the path an not the name

1 Like

One month later, is there any news about this issue? :slight_smile:
I think it might be good to store the actual data location information in the .md file. Or it might be good to have a look-up table/dictionary that records the files’ location and keeps track of them after moving the files to different folders and make an alias (as the file ID) of the file. And in every .md file, users actually refer to that file ID and can also give a display name of that file. Not sure whether it is a good idea.

1 Like