tracker r2149 - in branches/indexer-split: . src/tracker-indexer
- From: ifrade svn gnome org
- To: svn-commits-list gnome org
- Subject: tracker r2149 - in branches/indexer-split: . src/tracker-indexer
- Date: Mon, 25 Aug 2008 15:59:03 +0000 (UTC)
Author: ifrade
Date: Mon Aug 25 15:59:03 2008
New Revision: 2149
URL: http://svn.gnome.org/viewvc/tracker?rev=2149&view=rev
Log:
Using new method to obtain path and name
Modified:
branches/indexer-split/ChangeLog
branches/indexer-split/src/tracker-indexer/tracker-indexer-db.c
branches/indexer-split/src/tracker-indexer/tracker-indexer.c
Modified: branches/indexer-split/src/tracker-indexer/tracker-indexer-db.c
==============================================================================
--- branches/indexer-split/src/tracker-indexer/tracker-indexer-db.c (original)
+++ branches/indexer-split/src/tracker-indexer/tracker-indexer-db.c Mon Aug 25 15:59:03 2008
@@ -351,15 +351,13 @@
{
TrackerDBInterface *iface;
GError *error = NULL;
- gchar *from_dirname, *from_basename, *to_dirname, *to_basename;
+ gchar *from_dirname = NULL, *from_basename = NULL, *to_dirname = NULL, *to_basename = NULL;
iface = tracker_db_manager_get_db_interface_by_type (tracker_service_get_name (service),
TRACKER_DB_CONTENT_TYPE_METADATA);
- from_dirname = tracker_file_get_vfs_path (from);
- from_basename = tracker_file_get_vfs_name (from);
- to_dirname = tracker_file_get_vfs_path (to);
- to_basename = tracker_file_get_vfs_name (to);
+ tracker_file_get_path_and_name (from, &from_dirname, &from_basename);
+ tracker_file_get_path_and_name (to, &to_dirname, &to_basename);
tracker_db_interface_execute_procedure (iface, NULL, "MoveService",
from_dirname, from_basename,
@@ -368,6 +366,12 @@
/* FIXME: This procedure should use LIKE statement */
tracker_db_interface_execute_procedure (iface, &error, "MoveServiceChildren", from, to, from, NULL);
+
+ g_free (from_dirname);
+ g_free (from_basename);
+
+ g_free (to_dirname);
+ g_free (to_basename);
}
void
Modified: branches/indexer-split/src/tracker-indexer/tracker-indexer.c
==============================================================================
--- branches/indexer-split/src/tracker-indexer/tracker-indexer.c (original)
+++ branches/indexer-split/src/tracker-indexer/tracker-indexer.c Mon Aug 25 15:59:03 2008
@@ -1319,7 +1319,7 @@
TrackerService *service_def;
TrackerField *field_def;
guint service_id, i;
- gchar *joined, *dirname, *basename;
+ gchar *joined, *dirname = NULL, *basename =NULL;
gint len;
g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
@@ -1365,8 +1365,7 @@
return FALSE;
}
- dirname = tracker_file_get_vfs_path (uri);
- basename = tracker_file_get_vfs_name (uri);
+ tracker_file_get_path_and_name (uri, &dirname, &basename);
tracker_db_check_service (service_def,
dirname,
@@ -1459,7 +1458,7 @@
TrackerService *service_def;
TrackerField *field_def;
guint service_id, i;
- gchar *joined = NULL, *dirname, *basename;
+ gchar *joined = NULL, *dirname = NULL, *basename = NULL;
service_def = tracker_ontology_get_service_type_by_name (service_type);
if (!service_def) {
@@ -1490,8 +1489,7 @@
return FALSE;
}
- dirname = tracker_file_get_vfs_path (uri);
- basename = tracker_file_get_vfs_name (uri);
+ tracker_file_get_path_and_name (uri, &dirname, &basename);
tracker_db_check_service (service_def, dirname, basename, &service_id, NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]