[tracker/miner-fs-refactor: 96/127] libtracker-miner: Ensure TrackerFileSystem has a meaningful file type
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/miner-fs-refactor: 96/127] libtracker-miner: Ensure TrackerFileSystem has a meaningful file type
- Date: Mon, 5 Dec 2011 13:27:41 +0000 (UTC)
commit d0da7ffa966fe7e4ed9241944d9ecdb680f17201
Author: Carlos Garnacho <carlos lanedo com>
Date: Thu Oct 20 13:51:41 2011 +0200
libtracker-miner: Ensure TrackerFileSystem has a meaningful file type
tracker_file_system_get_file() will be called several times on the
same file, so store the first meaningful GFileType gotten through
that call.
src/libtracker-miner/tracker-file-system.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/src/libtracker-miner/tracker-file-system.c b/src/libtracker-miner/tracker-file-system.c
index 4da92c4..3c940a9 100644
--- a/src/libtracker-miner/tracker-file-system.c
+++ b/src/libtracker-miner/tracker-file-system.c
@@ -473,6 +473,11 @@ tracker_file_system_get_file (TrackerFileSystem *file_system,
} else {
data = node->data;
g_free (uri_suffix);
+
+ /* Update file type if it was unknown */
+ if (data->file_type == G_FILE_TYPE_UNKNOWN) {
+ data->file_type = file_type;
+ }
}
return data->file;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]