summaryrefslogtreecommitdiff
path: root/src/nautilus-batch-rename-utilities.c
diff options
context:
space:
mode:
authorAlexandru Pandelea <alexandru.pandelea@gmail.com>2017-01-02 22:45:41 +0200
committerAlexandru Pandelea <alexandru.pandelea@gmail.com>2017-02-03 11:46:11 +0200
commit783d816996ff6db4656d11d15f8a28069919f031 (patch)
tree69a818383d7e706643ee9873cb3347a87c904f7c /src/nautilus-batch-rename-utilities.c
parent73ac9eeb9c79ed519360a66ada568d40be2cb82c (diff)
downloadnautilus-783d816996ff6db4656d11d15f8a28069919f031.tar.gz
batch-rename-utilities: check if file has nie:url
If there is a file indexed by tracker that doesn't have nie:url, then the query will fail everytime, because it will pass null to uri-is-parent which will then give an error. To fix this, in the query, check first that the file has nie:url. https://bugzilla.gnome.org/show_bug.cgi?id=770944
Diffstat (limited to 'src/nautilus-batch-rename-utilities.c')
-rw-r--r--src/nautilus-batch-rename-utilities.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nautilus-batch-rename-utilities.c b/src/nautilus-batch-rename-utilities.c
index 88585b7ca..bb260c545 100644
--- a/src/nautilus-batch-rename-utilities.c
+++ b/src/nautilus-batch-rename-utilities.c
@@ -1056,13 +1056,13 @@ check_metadata_for_selection (NautilusBatchRenameDialog *dialog,
"nmm:artistName(nmm:performer(?file)) "
"nie:title(?file) "
"nmm:albumTitle(nmm:musicAlbum(?file)) "
- "WHERE { ?file a nfo:FileDataObject. ");
+ "WHERE { ?file a nfo:FileDataObject. ?file nie:url ?url. ");
parent_uri = nautilus_file_get_parent_uri (NAUTILUS_FILE (selection->data));
parent_uri_escaped = g_markup_escape_text (parent_uri, -1);
g_string_append_printf (query,
- "FILTER(tracker:uri-is-parent('%s', nie:url(?file))) ",
+ "FILTER(tracker:uri-is-parent('%s', ?url)) ",
parent_uri_escaped);
for (l = selection; l != NULL; l = l->next)