mirror of
https://github.com/elpamplina/mastodon-threading.git
synced 2026-07-22 05:35:49 +00:00
Fix "file not found" on attachments with relative notation
This commit is contained in:
parent
5dbe58b2eb
commit
6203a76198
5 changed files with 11 additions and 4 deletions
|
|
@ -1,5 +1,11 @@
|
|||
# Changelog
|
||||
|
||||
## [1.1.1](https://github.com/elpamplina/mastodon-threading/compare/1.1.0...1.1.1)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
* Fixed "file not found" when attachment folder were configured by relative notation.
|
||||
|
||||
## [1.1.0](https://github.com/elpamplina/mastodon-threading/compare/1.0.9...1.1.0)
|
||||
|
||||
### New features
|
||||
|
|
|
|||
2
main.ts
2
main.ts
|
|
@ -285,7 +285,7 @@ export default class MastodonThreading extends Plugin {
|
|||
if (file === null) {
|
||||
// Try on the attachment folder
|
||||
// @ts-ignore
|
||||
file = this.app.vault.getFileByPath(`${this.app.vault.getConfig("attachmentFolderPath")}/${m[1]}`);
|
||||
file = this.app.vault.getFileByPath(`${this.app.vault.getConfig("attachmentFolderPath").replace(/^\.\//, '')}/${m[1]}`);
|
||||
if (file === null) {
|
||||
new Notice(t('error.file_not_found'));
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"id": "mastodon-threading",
|
||||
"name": "Mastodon Threading",
|
||||
"version": "1.1.0",
|
||||
"version": "1.1.1",
|
||||
"minAppVersion": "1.7.7",
|
||||
"description": "Compose and post threads to Mastodon.",
|
||||
"author": "El Pamplina de Cai",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "mastodon-threading",
|
||||
"version": "1.1.0",
|
||||
"version": "1.1.1",
|
||||
"description": "Obsidian plugin to compose and post threads to Mastodon",
|
||||
"main": "main.js",
|
||||
"scripts": {
|
||||
|
|
|
|||
|
|
@ -6,5 +6,6 @@
|
|||
"1.0.7": "1.7.7",
|
||||
"1.0.8": "1.7.7",
|
||||
"1.0.9": "1.7.7",
|
||||
"1.1.0": "1.7.7"
|
||||
"1.1.0": "1.7.7",
|
||||
"1.1.1": "1.7.7"
|
||||
}
|
||||
Loading…
Reference in a new issue