Purge of .crypted files ? or orphan resources?

Operating system

macOS

Joplin version

3.4.5

Sync target

Joplin Cloud

What issue do you have?

Hello,
I'm using E2EE and Joplin is creating many .crypted files for sending my resources to the Cloud. That's fine and everything is well synchronized.
The issue is that in the "resources" folder on my main MacBook many .crypted files are remaining.
I have read that we can delete them as they only are useful for transfers but i wanted to know if there is an automatic cleaning process in Joplin that would do it for me or if i need to clean them manually to save space on my computer ?
maybe, if nothing is available in Joplin, there may be a plugin ? the task is easy, delete all .crypted files from the resources' folder periodically :slight_smile:
And is it the same for the resources of notes that have been deleted ? is there a cleaning process to check if all resources are mentionned in at least one note ?
Thanks

I looked at it a few times but every time I'm concerned that deleting them while the app is running could interfere with E2EE, which runs in a background service. It's definitely fine to delete them while the app is not running though, and eventually we should look into it again and find a safe way to delete them at runtime.

I understand the problem yes. And I understand it’s not an issue for most users with small notes with not too much resources but during my first syncs my hard drive was totally full because of all these .crypted temp files that were not deleted.

Maybe you can look at the modification date of the file ? is it re-encrypted and sent to the server at every modification of the note even if the resource is not changed ?

Or maybe when we are opening Joplin, before starting the background service, there could be a purge. Or when closing Joplin, after having stopped the background service ?