[tracker/external-crawler: 37/45] libtracker-miner: Change all g_file_get_path() instances to _get_uri()
- From: Martyn James Russell <mr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/external-crawler: 37/45] libtracker-miner: Change all g_file_get_path() instances to _get_uri()
- Date: Tue, 12 Aug 2014 18:56:12 +0000 (UTC)
commit 8329b9a6ad358451d85f4a7c5144b508ca36fd32
Author: Martyn Russell <martyn lanedo com>
Date: Tue Jul 1 11:59:44 2014 +0100
libtracker-miner: Change all g_file_get_path() instances to _get_uri()
Since we don't always have a path depending on the GFile backend
src/libtracker-miner/tracker-crawler.c | 10 ++++----
src/libtracker-miner/tracker-file-enumerator.c | 8 +++---
src/libtracker-miner/tracker-miner-fs.c | 26 ++++++++++++------------
3 files changed, 22 insertions(+), 22 deletions(-)
---
diff --git a/src/libtracker-miner/tracker-crawler.c b/src/libtracker-miner/tracker-crawler.c
index ecc477a..49cab90 100644
--- a/src/libtracker-miner/tracker-crawler.c
+++ b/src/libtracker-miner/tracker-crawler.c
@@ -729,15 +729,15 @@ file_enumerate_children_cb (GObject *object,
if (!files) {
if (error && !cancelled) {
- gchar *path;
+ gchar *uri;
- path = g_file_get_path (parent);
+ uri = g_file_get_uri (parent);
- g_warning ("Could not open directory '%s': %s",
- path, error->message);
+ g_warning ("Could not enumerate container / directory '%s', %s",
+ uri, error->message);
g_error_free (error);
- g_free (path);
+ g_free (uri);
}
enumerator_data_free (ed);
diff --git a/src/libtracker-miner/tracker-file-enumerator.c b/src/libtracker-miner/tracker-file-enumerator.c
index f60162c..823e6d3 100644
--- a/src/libtracker-miner/tracker-file-enumerator.c
+++ b/src/libtracker-miner/tracker-file-enumerator.c
@@ -124,15 +124,15 @@ file_enumerator_get_children (TrackerEnumerator *enumerator,
if (!fe) {
if (local_error && !cancelled) {
- gchar *path;
+ gchar *uri;
- path = g_file_get_path (dir);
+ uri = g_file_get_uri (dir);
g_warning ("Could not open directory '%s': %s",
- path, local_error->message);
+ uri, local_error->message);
g_propagate_error (error, local_error);
- g_free (path);
+ g_free (uri);
}
return NULL;
diff --git a/src/libtracker-miner/tracker-miner-fs.c b/src/libtracker-miner/tracker-miner-fs.c
index 98ae4ae..fc0366b 100644
--- a/src/libtracker-miner/tracker-miner-fs.c
+++ b/src/libtracker-miner/tracker-miner-fs.c
@@ -2553,7 +2553,7 @@ item_queue_handlers_set_up (TrackerMinerFS *fs)
if (fs->priv->item_queue_blocker) {
trace_eq (" cancelled: item queue blocked waiting for file '%s'",
- g_file_get_path (fs->priv->item_queue_blocker));
+ g_file_get_uri (fs->priv->item_queue_blocker));
return;
}
@@ -3319,7 +3319,7 @@ tracker_miner_fs_check_file_with_priority (TrackerMinerFS *fs,
gboolean check_parents)
{
gboolean should_process = TRUE;
- gchar *path;
+ gchar *uri;
g_return_if_fail (TRACKER_IS_MINER_FS (fs));
g_return_if_fail (G_IS_FILE (file));
@@ -3328,11 +3328,11 @@ tracker_miner_fs_check_file_with_priority (TrackerMinerFS *fs,
should_process = should_check_file (fs, file, FALSE);
}
- path = g_file_get_path (file);
+ uri = g_file_get_uri (file);
g_debug ("%s:'%s' (FILE) (requested by application)",
should_process ? "Found " : "Ignored",
- path);
+ uri);
if (should_process) {
if (check_parents && !check_file_parents (fs, file)) {
@@ -3348,7 +3348,7 @@ tracker_miner_fs_check_file_with_priority (TrackerMinerFS *fs,
item_queue_handlers_set_up (fs);
}
- g_free (path);
+ g_free (uri);
}
@@ -3369,15 +3369,15 @@ tracker_miner_fs_writeback_file (TrackerMinerFS *fs,
GStrv rdf_types,
GPtrArray *results)
{
- gchar *path;
+ gchar *uri;
ItemWritebackData *data;
g_return_if_fail (TRACKER_IS_MINER_FS (fs));
g_return_if_fail (G_IS_FILE (file));
- path = g_file_get_path (file);
+ uri = g_file_get_uri (file);
- g_debug ("Performing write-back:'%s' (requested by application)", path);
+ g_debug ("Performing write-back:'%s' (requested by application)", uri);
trace_eq_push_tail ("WRITEBACK", file, "Requested by application");
@@ -3387,7 +3387,7 @@ tracker_miner_fs_writeback_file (TrackerMinerFS *fs,
item_queue_handlers_set_up (fs);
- g_free (path);
+ g_free (uri);
}
/**
@@ -3499,7 +3499,7 @@ tracker_miner_fs_check_directory_with_priority (TrackerMinerFS *fs,
gboolean check_parents)
{
gboolean should_process = TRUE;
- gchar *path;
+ gchar *uri;
g_return_if_fail (TRACKER_IS_MINER_FS (fs));
g_return_if_fail (G_IS_FILE (file));
@@ -3508,11 +3508,11 @@ tracker_miner_fs_check_directory_with_priority (TrackerMinerFS *fs,
should_process = should_check_file (fs, file, TRUE);
}
- path = g_file_get_path (file);
+ uri = g_file_get_uri (file);
g_debug ("%s:'%s' (DIR) (requested by application)",
should_process ? "Found " : "Ignored",
- path);
+ uri);
if (should_process) {
TrackerDirectoryFlags flags;
@@ -3536,7 +3536,7 @@ tracker_miner_fs_check_directory_with_priority (TrackerMinerFS *fs,
file, flags);
}
- g_free (path);
+ g_free (uri);
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]