sandorex / nuke-orphans-plugin

Obsidian notes plugin that trashes orphaned files and attachments
MIT License
45 stars 2 forks source link

Orphaned attachments (images) are visible in 'Nuke orphaned files' but not visible in 'Nuke orphaned attachments. Why? #11

Closed VKondakoff closed 8 months ago

VKondakoff commented 8 months ago

Hi!

Just noticed: some attachments (images) are visible in Nuke orphaned files but not visible in Nuke orphaned attachments. Why this happens?

Nuke orphaned files:

Снимок экрана 2024-03-20 в 14 57 11

Nuke orphaned attachments:

Снимок экрана 2024-03-20 в 14 58 02

MacOS, NO 1.2.5, Obsidian 1.5.11

sandorex commented 8 months ago

Could you provide a minimal vault that i could use to debug this?

VKondakoff commented 8 months ago

No need for this: I have found a reason of this behaviour. Here is my Obsidian Files and Links config:

Снимок экрана 2024-03-20 в 18 23 52

Attachment folder path is set to assets, while actual folder was named Assets. This does not prevents Obsidian to work as expected, but breaks NO Nuke orphaned links command. If I change the attachment folder name in Obsidian config to Assets - NO starts to work as exected. If I change it back to assets - NO could not find the orphaned attachments.

So - this is a case sensitivity issue.

sandorex commented 8 months ago

This is intended behavior of the plugin, but it is weird that obsidian is case insensitive

The reason for difference between 'Nuke Orphaned Files' and 'Nuke Orphaned Attachments' is cause of different APIs used, first reading the files using the attachment path, latter reading only obsidian cached data