[tracker/miner-fs-refactor: 96/127] libtracker-miner: Ensure TrackerFileSystem has a meaningful file type
- From: Martyn James Russell <mr 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: Wed, 7 Dec 2011 10:45:01 +0000 (UTC)
commit fa2c5a03792e058c7cdfbd89e781bad5e0c15608
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]