Skip to content
  • Ahmad Samir's avatar
    FileFilterHotSpot: check the mime type of the file after cleaning the path · a5f29806
    Ahmad Samir authored and Kurt Hindenburg's avatar Kurt Hindenburg committed
    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
    a5f29806