Skip to content

FileFilterHotSpot: check the mime type of the file after cleaning the path

Ahmad Samir requested to merge work/ahmad/file-filter-hotspot into master

QMimeDataBase will return "application/octet-stream" as the mime type of something like "path/to/some/textfile.txt:123:123:", because we are using methods from it that check only the file extension. That meant some valid text files with line/column suffixes couldn't be opened.

Instead move the mime type check after the file path has been cleaned. Also account for mime types that aren't recognized, e.g. a text file with no extension.

BUG: 431601

Merge request reports

Loading