test failure with Glib 2.58
With glib 2.58 "application/x-zerosize" mime-type is returned for empty text files.
This causes the following test failure, when testing the mime-type of an empty txt file.
What is the best way to deal with this? my thought would be to write some random ascii/text into the file so the mime-type is returned as 'text/plain' on all version of Glib.
ERROR: tracker-file-utils
=========================
**
Tracker:ERROR:tracker-file-utils-test.c:234:test_file_get_mime_type:
assertion failed (result == "text/plain"): ("application/x-zerosize" ==
"text/plain")
Aborted
# random seed: R02Sc1c5ab41dd178938e53952e83fd10d19
1..14
# Start of libtracker-common tests
# Start of file-utils tests
ok 1 /libtracker-common/file-utils/path_evaluate_name
PASS: tracker-file-utils 1 /libtracker-common/file-utils/path_evaluate_name
# Tracker-DEBUG: Removing path:'/usr/share/local', it is in path:'/usr/'
# Tracker-DEBUG: Removing path:'/home/ivan', it is in path:'/home'
ok 2 /libtracker-common/file-utils/path_list_filter_duplicates
PASS: tracker-file-utils 2
/libtracker-common/file-utils/path_list_filter_duplicates
# Tracker-DEBUG: Removing path:'/home/user/MyDocs/visible', it is in
path:'/home/user/MyDocs'
# Tracker-DEBUG: Removing path:'/home/user/MyDocs/.sounds', it is in
path:'/home/user/MyDocs'
ok 3
/libtracker-common/file-utils/path_list_filter_duplicates_with_exceptions
PASS: tracker-file-utils 3
/libtracker-common/file-utils/path_list_filter_duplicates_with_exceptions
Bail out!
Tracker:ERROR:tracker-file-utils-test.c:234:test_file_get_mime_type:
assertion failed (result == "text/plain"): ("application/x-zerosize" ==
"text/plain")
ERROR: tracker-file-utils - Bail out!
Tracker:ERROR:tracker-file-utils-test.c:234:test_file_get_mime_type:
assertion failed (result == "text/plain"): ("application/x-zerosize" ==
"text/plain")
Edited by Tim Lunn