tracker r2860 - in trunk: . src/tracker-indexer
- From: carlosg svn gnome org
- To: svn-commits-list gnome org
- Subject: tracker r2860 - in trunk: . src/tracker-indexer
- Date: Thu, 29 Jan 2009 16:26:09 +0000 (UTC)
Author: carlosg
Date: Thu Jan 29 16:26:09 2009
New Revision: 2860
URL: http://svn.gnome.org/viewvc/tracker?rev=2860&view=rev
Log:
2009-01-29 Carlos Garnacho <carlos imendio com>
* src/tracker-indexer/tracker-module-file.c
(tracker_module_file_get_metadata): Set File:Modified to the current
time() if the module didn't provide any.
Modified:
trunk/ChangeLog
trunk/src/tracker-indexer/tracker-module-file.c
Modified: trunk/src/tracker-indexer/tracker-module-file.c
==============================================================================
--- trunk/src/tracker-indexer/tracker-module-file.c (original)
+++ trunk/src/tracker-indexer/tracker-module-file.c Thu Jan 29 16:26:09 2009
@@ -23,6 +23,7 @@
#define METADATA_FILE_PATH "File:Path"
#define METADATA_FILE_NAME "File:Name"
+#define METADATA_FILE_MODIFIED "File:Modified"
#define TRACKER_MODULE_FILE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TRACKER_TYPE_MODULE_FILE, TrackerModuleFilePrivate))
@@ -270,8 +271,11 @@
metadata = TRACKER_MODULE_FILE_GET_CLASS (file)->get_metadata (file);
}
- if (metadata &&
- !tracker_module_metadata_lookup (metadata, METADATA_FILE_PATH, NULL) &&
+ if (!metadata) {
+ return NULL;
+ }
+
+ if (!tracker_module_metadata_lookup (metadata, METADATA_FILE_PATH, NULL) &&
!tracker_module_metadata_lookup (metadata, METADATA_FILE_NAME, NULL)) {
gchar *uri, *dirname, *basename;
@@ -286,6 +290,10 @@
g_free (uri);
}
+ if (!tracker_module_metadata_lookup (metadata, METADATA_FILE_MODIFIED, NULL)) {
+ tracker_module_metadata_add_date (metadata, METADATA_FILE_MODIFIED, time (NULL));
+ }
+
return metadata;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]