Fixed total dirs/files message hiding condition

Fixes #5829