obsidianmd / obsidian-api

Type definitions for the latest Obsidian API.
https://docs.obsidian.md
MIT License
1.65k stars 192 forks source link

Bug: app.vault.getAbstractFileByPath always return null #123

Closed swhoro closed 11 months ago

swhoro commented 11 months ago

image

As the image show, app.vault.getAbstractFileByPath can only get root ("/") TAbstractFile, but cannot get any other sub folders or files

The bug can be reproduced both in dev console and in dataviewjs block

joethei commented 11 months ago

This is to be expected, paths in Obsidian don't start with a slash. (The root folder / is a special case)

swhoro commented 11 months ago

This is to be expected, paths in Obsidian don't start with a slash. (The root folder / is a special case)

thank you