summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartyn Russell <martyn@lanedo.com>2014-07-01 11:59:44 +0100
committerMartyn Russell <martyn@lanedo.com>2014-08-12 19:51:21 +0100
commit8329b9a6ad358451d85f4a7c5144b508ca36fd32 (patch)
treeba966ad7c9cfcf8c438da623fa400a06b71e6ab6
parent990d0a65c009d4d1c9415eb9c32eb04313c71aab (diff)
downloadtracker-8329b9a6ad358451d85f4a7c5144b508ca36fd32.tar.gz
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
-rw-r--r--src/libtracker-miner/tracker-crawler.c10
-rw-r--r--src/libtracker-miner/tracker-file-enumerator.c8
-rw-r--r--src/libtracker-miner/tracker-miner-fs.c26
3 files changed, 22 insertions, 22 deletions
diff --git a/src/libtracker-miner/tracker-crawler.c b/src/libtracker-miner/tracker-crawler.c
index ecc477a0e..49cab907c 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 f60162c6e..823e6d32f 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 98ae4ae00..fc0366bc3 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);
}
/**