Open sitepodmatt opened 2 years ago
Hey @phibr0! I know this is an old issue but the reason for this behaviour is that you're normalizing the app.vault.adapter.basePath
. The Zotero Integration plugin recently had the same issue where images were created in nested home folders and after some head scratching we found out that this is the culprit. If you drop the normalizePath, it should work again for all users.
getAbsolutePathOfFile(file) {
//@ts-ignore
const path = `${this.app.vault.adapter.basePath}/${file.path}`;
if (obsidian.Platform.isDesktopApp && navigator.platform === "Win32") {
return path.replace(/\//g, "\\");
}
return path;
}
Made a pull request to fix this (#19).
Platform: Ubuntu 21.10 LTS 64bit Obsidian 0.12.19
The Obsidian application needs to launched with the working directory set to root '/' for this plugin to work correctly because it attempts to open external programs with a root relative path (i.e. no initial /). If you launch from your home directory it will attempt to open with with a root relative link and thus yield an invalid path e.g. /home/matt/home/matt/notes/interesting.md
Current workaround compatible with most DE: one can specify the working directory for the menu entry