obsidian-scholar
obsidian-scholar copied to clipboard
Windows default path separator breaks PDF link
When using the plugin on Windows platform, the plugin is able to parse the URL and download the PDF as-intended. However, when it creates the paper note, the link to the downloaded local PDF file in the 'pdf' property is invalid because it uses '' as separator instead of '/'. Screenshot:
I understand that on Windows, if I am using absolute path, the separator should be '' (e.g. C:\Users\user\obsidian
). However, it seems like the auto generated link uses relative path, which uses '/' as path separator.
I am able to fix this problem myself by changing the main.js
file of the plugin and make function getSystemPathSeparator()
always return '/'. I am wondering if the platform-dependent separator is indeed intended or is it potentially a bug (Windows + relative path).
Steps to reproduce:
- add any paper through
Scholar: Add paper to library
- PDF will be downloaded and note will be created. But note contains invalid local PDF link, leading to invalid file property.
Platform: Windows Plugin version: 1.3.3 Obsidian version: 1.6.3