Fixed isPreviewAvailable warnings in log

isPreviewAvailable wasn't always set as the files formatting code is
slightly different than the one from the files app.

Fixes #6423

Backport of f4c198b to stable6