CyberGene
I'm very sorry that you have been impacted by this, especially in the way that it has affected your community.
CyberGene Is there any log of the cleanup command that I can find somewhere to at least list all the deleted files, so that I can warn people about the deletions?
Sadly, no logging is done by the command, other than the output provided on the CLI.
CyberGene I can confirm the cleanup logic is faulty.
Yes, having just tested this, I can also confirm that a major issue exists within this code.
Moving forward from here
I am currently working on a feature update for this extension, which is nearing completion at the moment. As part of this, I will disable the CLI commands temporarily, so that no-one else is impacted by it.
Once this is done, I/we will carefully review the code, add automated testing and correct the logic so that it performs as expected. Only then, I will re-release the feature when I am happy that there is no risk of data loss.
As a side note, recently all FoF extensions have had PHPStan
(a static code analysis tool) enabled, and many extensions have started to have automated tests added, in a drive to continuously improve our codebase and provide well maintained extensions for the Flarum ecosystem.
Please keep an eye out on this discussion and FriendsOfFlarum/upload374 for further news on the progress of this most important fix.