husjon / obsidian-file-cleaner-redux

A plugin for Obsidian to help clean up files in your vault
MIT License
29 stars 2 forks source link

For some reason the plugin not executed on startup #53

Open itoldusoandso opened 5 months ago

itoldusoandso commented 5 months ago

And I don't know why. I just doesn't run. I have orphans to clean but it doesn't clean them on startup, regardless if I select with or without confirmation. If I press Clean files (the little trash icon), it finds the files or folders and deletes.

Tested a few times, created a note, added a PDF, then deleted note but left PDF untouched, then run the plugin manually, it offers to delete them. But if I want the plugin to find the orphans and delete them on start of Obsidian, it doesn't.

Not sure what is going on.

image

husjon commented 5 months ago

Hi, thanks for raising the issue, I might have an idea as to what it could, currently the plugin uses an arbitrary wait time of 1 second from being loaded until it runs the cleanup, this might be affected how long it takes for Obsidian to start up.

Could you try to close down the vault, then re-open it. After it has finished indexing, open up the Developer Console by pressing (Control + Shift + I / Command + Shift + I on Mac)

You should see see something along the lines of the following image

If you do not see the lines, could you try to run the cleanup process while having the console open, this should generate the output, once you see it, copy the line saying File Cleaner Redux: Finished indexing X files and Y folders in Zms.