[tracker] miner-fs: Fix tracking file move
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] miner-fs: Fix tracking file move
- Date: Sat, 20 Dec 2014 16:49:17 +0000 (UTC)
commit cd731b485ba38d9a010d010a11075fe2cef49276
Author: Martin Kampas <martin kampas tieto com>
Date: Tue Oct 7 12:28:04 2014 +0200
miner-fs: Fix tracking file move
Identified by MinerCrawlTest::test_07_move_from_monitored_to_monitored
(300-miner-basic-ops.py)
In item_move() it fails to get source_iri, does not check it's validity and
uses it in the DELETE expression of the SPARQL query constructed there.
Broken since d836f00 (libtracker-miner: Store iri transiently as GFile
qdata) - tracker_file_notifier_get_file_iri() is added 'force' argument
and (wrapped with lookup_file_urn) passed force=FALSE from item_move().
This call then fails for regular files because only directories are
cached once crawling has completed as stated in the comment in
finish_current_directory() in libtracker-miner/tracker-file-notifier.c.
https://bugzilla.gnome.org/show_bug.cgi?id=678986
src/libtracker-miner/tracker-miner-fs.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/libtracker-miner/tracker-miner-fs.c b/src/libtracker-miner/tracker-miner-fs.c
index 28842e3..113c770 100644
--- a/src/libtracker-miner/tracker-miner-fs.c
+++ b/src/libtracker-miner/tracker-miner-fs.c
@@ -1877,7 +1877,7 @@ item_move (TrackerMinerFS *fs,
NULL, NULL);
/* Get 'source' ID */
- source_iri = lookup_file_urn (fs, source_file, FALSE);
+ source_iri = lookup_file_urn (fs, source_file, TRUE);
source_exists = (source_iri != NULL);
if (!file_info) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]