[tracker/rss-enclosures] libtracker-miner: file may not have parent



commit 528760bcd2e9880996caf4fb9e9ad90e536d4e4a
Author: Aleksander Morgado <aleksander lanedo com>
Date:   Thu Jul 22 16:24:26 2010 +0200

    libtracker-miner: file may not have parent

 src/libtracker-miner/tracker-miner-fs.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/libtracker-miner/tracker-miner-fs.c b/src/libtracker-miner/tracker-miner-fs.c
index 0ec5b3d..a14ec4a 100644
--- a/src/libtracker-miner/tracker-miner-fs.c
+++ b/src/libtracker-miner/tracker-miner-fs.c
@@ -3828,8 +3828,11 @@ tracker_miner_fs_add_directory_without_parent (TrackerMinerFS *fs,
         g_return_if_fail (TRACKER_IS_MINER_FS (fs));
         g_return_if_fail (G_IS_FILE (file));
 
-        /* Get parent of the input file */
+        /* Get parent of the input file, IF ANY! */
         parent = g_file_get_parent (file);
+        if (!parent) {
+	        return;
+        }
 
         for (l = fs->private->dirs_without_parent;
              l;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]