[gnome-games] tracker: Check that files exist in MimeTypeTrackerQuery
- From: Adrien Plazas <aplazas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games] tracker: Check that files exist in MimeTypeTrackerQuery
- Date: Wed, 17 Aug 2016 20:21:01 +0000 (UTC)
commit 135c6bb0834858553a6e12337780a31c553c7353
Author: Adrien Plazas <kekun plazas laposte net>
Date: Wed Aug 17 16:05:24 2016 +0200
tracker: Check that files exist in MimeTypeTrackerQuery
Make MimeTypeTrackerQuery.is_uri_valid() check that the file exist
rather than checking that the file's MIME type is correct.
This allows to make appear some games that should.
https://bugzilla.gnome.org/show_bug.cgi?id=769474
src/tracker/mime-type-tracker-query.vala | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
---
diff --git a/src/tracker/mime-type-tracker-query.vala b/src/tracker/mime-type-tracker-query.vala
index 8ec6caa..1e7901d 100644
--- a/src/tracker/mime-type-tracker-query.vala
+++ b/src/tracker/mime-type-tracker-query.vala
@@ -26,9 +26,7 @@ public class Games.MimeTypeTrackerQuery : Object, TrackerQuery {
public bool is_uri_valid (string uri) {
File file = File.new_for_uri(uri);
try {
- var info = file.query_info ("*", FileQueryInfoFlags.NONE);
-
- return info.get_content_type () == mime_type;
+ return file.query_exists ();
} catch (Error e) {
debug (e.message);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]