The removeorphans command fails to delete files that are a case-insensitive match to an entry in the database. Since Magento only officially supports Linux as an OS, we can be confident that a file that doesn't match exactly to what's in the database is indeed an orphan.
Also:
Changed the query to be ever so slightly more efficient with a SELECT COUNT(*) since that's all we need.
Cleaned up error message for case when a file can't be deleted.
The
removeorphans
command fails to delete files that are a case-insensitive match to an entry in the database. Since Magento only officially supports Linux as an OS, we can be confident that a file that doesn't match exactly to what's in the database is indeed an orphan.Also:
SELECT COUNT(*)
since that's all we need.