Steps to reproduce
Create a vault with:
- target.md
- subdir1/subdir2/ (a folder named subdir2 inside subdir1)
- subdir1/source.md
Change settings:
- Files and Links → New Link Format: Relative path to file
- Files and Links → Use Wikilinks: disabled (so it uses markdown instead)
Test file linking:
- Update source.md to contain a link to target
[target](../target.md), which is located in the parent folder - Observe that clicking “target” correctly navigates to the file
- In the tree view, drag “source.md” from subdir1/ to subdir1/subdir2/ (into the child folder)
- Observe that the link was correctly updated to go up two directories
[target](../../target.md)with the added../ - In the tree view, drag “source.md” back to the original location, subdir1/
- Observe that the link now incorrectly uses
[target](../../target.md), retaining an excess../
When following relative links, Obsidian ignores excess ../ that would navigate beyond the root folder of the vault. But the bad links are a problem when the Markdown is exported to other contexts, such as documentation in a GitHub project.
Did you follow the troubleshooting guide? [Y/N]
Yes, it reproduces in a fresh sandbox
Expected result
When moving a file up through a directory tree, I expected excess ../ to be removed, just as they were automatically added when moving them deeper into the tree.
Actual result
Excess ../ are retained.
Environment
SYSTEM INFO:
Obsidian version: v1.8.10
Installer version: v1.8.10
Operating system: Darwin Kernel Version 24.5.0: Tue Apr 22 19:53:27 PDT 2025; root:xnu-11417.121.6~2/RELEASE_ARM64_T6041 24.5.0
Login status: logged in
Language: en
Catalyst license: none
Insider build toggle: off
Live preview: on
Base theme: adapt to system
Community theme: none
Snippets enabled: 0
Restricted mode: on
RECOMMENDATIONS:
none
Additional information
I suspect there are really two bugs here, and the second masks the first:
- It’s a bug that Obsidian does not strip excess
../from relative links - It’s a bug that Obsidian doesn’t warn users if relative links navigate outside the vault. There may be legitimate cases for this, but I suspect it’s more often an error.
I’ve run into this as I evaluate using Obsidian to maintain project documentation within a GitHub repository. Ideally, I’d love to be able to drag documents around in the project tree to reflect their current implementation status. Automatic link updates would create tremendous value here. But as it stands, Obsidian generates too many broken links.