My first thought when I saw the new feature was exactly this. If it's relying on hashes.json to decide what to delete, that's a little scary. Oops, hashes.json or robots.txt or the empty html files some directories have. Or how about config.php?
I have an addon that does a cleanup of old files, but it was wanting to delete a lot of things that I didn't really want to delete because they were missing from hashes.json, so I ended up just using it as something to tell me the files and I could make the decision myself.
After it was said an done and I removed the files that should have been removed, there was still ~20 files that it wanted to delete because they were missing from hashes.json:
Ended up getting it sorted out already. Ended up with files I added (things like robots.txt), some random empty files that XF ships with that aren't in hashes.json, and the contents of
src/vendor-patch
(for some reason they don't have hashes generated... not sure why they wouldn't, but they don't). Looks better now.
Code:
twin1:web # php cmd.php dp:legacy-files
library/.htaccess
library/index.html
robots.txt
src/.htaccess
src/config.php.default
src/index.html
src/vendor-patch/League/Flysystem/CorruptedPathDetected.php
src/vendor-patch/League/Flysystem/Util.php
src/config.php...
There's even been times where PHP files have been missing from the hashes.json file:
Due to
this, I saw a few PHP valid files (that shouldn't change) are missing from the hashes.json file.
Code:
src/vendor-patch/League/Flysystem/CorruptedPathDetected.php
src/vendor-patch/League/Flysystem/Util.php
js/devjs.php
Haven't looked at it yet, but hopefully the cleanup tool has a dry run option so we can see what it will delete.