ozntel / oz-clear-unused-images-obsidian

Obsidian plugin to clear the images that are not used in note files anymore
194 stars 16 forks source link

[BUG] Deleted images by mistake #18

Open T4erg opened 2 years ago

T4erg commented 2 years ago

It has deleted images that had been used in a file。

File path: vault/中文/article.md

Image formation in the file: ![[assets/image-20220831182103.png]]

Image path: vault/中文/assets

Clear Unused Images - Logs:

[+] 07/09/2022, 14:23:10: Clearing started.
[+] Moved to System Trash: 中文/assets/image-20220831182103.png
[+]1 image (s) in total deleted.
[+1 07/09/2022, 14:23:10: Clearing completed.
T4erg commented 2 years ago

The deleted image is the second image in the file. And the first image which has the name with same formation did not been deleted.

Can logs show more information to explain why those images has been recognized 'unused'?

thx a lot.

user30535 commented 2 years ago

I encountered the same problem.

user30535 commented 2 years ago

Since the plugin mistakenly deletes used images, I really want to know how to undo the deletion.

ozntel commented 1 year ago

The deleted image is the second image in the file. And the first image which has the name with same formation did not been deleted.

@T4erg Can you provide both exact links? It is hard for me to say why it might be caused. My first guess is the non-Latin characters but I need to have some comparisons to test. Thanks

Since the plugin mistakenly deletes used images, I really want to know how to undo the deletion.

@user30535 You can change plugin settings and send all deleted files to either Obsidian Trash or System Trash, which you are using. You can then easily put them back.

HuoHua2019 commented 7 months ago

I got the issue like this one sometimes. Here is one possible bug: Whatever image in the in the file I uploaded would be deleted in Obsidian by the plugin. test.md Besides the wiki link would not occur this issue.

The whole text is below as well:

test

test

test:test

test