Skip to content
Commits on Source (11)
NEW in 3.4.3 - 2023-01-11
=========================
* Fix possible warnings in tracker-miner-fs-3
* Fixes to handle BTRFS subvolumes
* Reset nie:isStoredAs/nie:interpretedAs on updated folders
* Drop 'fluidsynthmidi' GStreamer module
* Fix GSource leak
Translations: ab
NEW in 3.4.2 - 2022-12-05
=========================
* Fix advised flatpak command in sandboxing documentation
......
project('tracker-miners', 'c',
version: '3.4.2',
version: '3.4.3',
meson_version: '>=0.51')
gnome = import('gnome')
......
msgid ""
msgstr ""
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/tracker-miners/issues\n"
"POT-Creation-Date: 2022-10-31 11:14+0000\n"
"POT-Creation-Date: 2022-12-05 16:45+0000\n"
"Last-Translator: Нанба Наала <naala-nanba@rambler.ru>\n"
"Language-Team: Abkhazian <daniel.abzakh@gmail.com>\n"
"Language: ab\n"
......@@ -1096,7 +1096,7 @@ msgstr ""
#: src/tracker/tracker-search.c:836
msgid "Feeds"
msgstr ""
msgstr "Алентақәа"
#: src/tracker/tracker-search.c:921
msgid "No software was found"
......
......@@ -53,7 +53,7 @@ libtracker_miner = library(
# This doesn't depend on tracker_common_dep because of
# https://github.com/mesonbuild/meson/issues/671
include_directories: [commoninc, configinc, srcinc],
dependencies: [tracker_sparql] + tracker_miner_dependencies + tracker_miners_common_dep,
dependencies: [tracker_sparql, tracker_miner_dependencies, tracker_miners_common_dep],
link_with: [libtracker_miner_private],
)
......
......@@ -658,8 +658,9 @@ root_data_remove_directory (RootData *data,
l = next;
}
return (g_file_equal (data->current_dir, directory) ||
g_file_has_prefix (data->current_dir, directory));
return (data->current_dir &&
(g_file_equal (data->current_dir, directory) ||
g_file_has_prefix (data->current_dir, directory)));
}
static void
......
......@@ -756,6 +756,27 @@ clear_mount_info (gpointer user_data)
g_free (info->id);
}
static gchar *
find_btrfs_subvolume (GUnixMountEntry *entry)
{
const gchar *options, *subvol, *end;
options = g_unix_mount_get_options (entry);
if (!options)
return NULL;
subvol = strstr (options, ",subvol=");
if (!subvol)
return NULL;
subvol += strlen (",subvol=");
end = strchr (subvol, ',');
if (end)
return g_strndup (subvol, end - subvol);
else
return g_strdup (subvol);
}
static void
update_mounts (TrackerUnixMountCache *cache)
{
......@@ -771,20 +792,25 @@ update_mounts (TrackerUnixMountCache *cache)
for (l = mounts; l; l = l->next) {
GUnixMountEntry *entry = l->data;
const gchar *devname;
gchar *id;
g_autofree gchar *id = NULL, *subvol = NULL;
UnixMountInfo mount;
devname = g_unix_mount_get_device_path (entry);
id = blkid_get_tag_value (cache->id_cache, "UUID", devname);
if (!id && strchr (devname, G_DIR_SEPARATOR) != NULL)
id = g_strdup (devname);
if (!id && strchr (devname, G_DIR_SEPARATOR) != NULL) {
subvol = find_btrfs_subvolume (entry);
if (subvol)
id = g_strconcat (devname, ":", subvol, NULL);
else
id = g_strdup (devname);
}
if (!id)
continue;
mount.mount_point = g_strdup (g_unix_mount_get_mount_path (entry));
mount.file = g_file_new_for_path (mount.mount_point);
mount.id = id;
mount.id = g_steal_pointer (&id);
g_array_append_val (cache->mounts, mount);
}
......@@ -841,7 +867,8 @@ tracker_unix_mount_cache_lookup_filesystem_id (GFile *file)
for (i = (gint) cache->mounts->len - 1; i >= 0; i--) {
UnixMountInfo *info = &g_array_index (cache->mounts, UnixMountInfo, i);
if (g_file_has_prefix (file, info->file)) {
if (g_file_equal (file, info->file) ||
g_file_has_prefix (file, info->file)) {
id = info->id;
break;
}
......
......@@ -113,8 +113,8 @@ miner_files_create_folder_information_element (TrackerMinerFiles *miner,
g_free (uri);
/* Laying the link between the IE and the DO */
tracker_resource_add_take_relation (resource, "nie:isStoredAs", file_resource);
tracker_resource_add_uri (file_resource, "nie:interpretedAs",
tracker_resource_set_take_relation (resource, "nie:isStoredAs", file_resource);
tracker_resource_set_uri (file_resource, "nie:interpretedAs",
tracker_resource_get_identifier (resource));
return resource;
......
......@@ -1460,7 +1460,7 @@ tracker_extract_module_init (GError **error)
/* Lifted from totem-video-thumbnailer */
const gchar *blocklisted[] = {
"bcmdec",
"fluiddec",
"fluidsynthmidi",
"vaapi",
"video4linux2",
"nvcodec",
......
......@@ -88,7 +88,8 @@ typedef struct {
TrackerExtractMetadataFunc func;
GModule *module;
guint timeout_id;
GSource *deadline;
guint success : 1;
} TrackerExtractTask;
......@@ -379,12 +380,11 @@ extract_task_new (TrackerExtract *extract,
task->extract = extract;
if (task->res) {
GSource *source;
source = g_timeout_source_new_seconds (DEADLINE_SECONDS);
g_source_set_callback (source, task_deadline_cb, task, NULL);
task->timeout_id =
g_source_attach (source, g_task_get_context (G_TASK (task->res)));
task->deadline =
g_timeout_source_new_seconds (DEADLINE_SECONDS);
g_source_set_callback (task->deadline, task_deadline_cb, task, NULL);
g_source_attach (task->deadline,
g_task_get_context (G_TASK (task->res)));
}
return task;
......@@ -395,8 +395,10 @@ extract_task_free (TrackerExtractTask *task)
{
notify_task_finish (task, task->success);
if (task->timeout_id)
g_source_remove (task->timeout_id);
if (task->deadline) {
g_source_destroy (task->deadline);
g_source_unref (task->deadline);
}
if (task->res) {
g_object_unref (task->res);
......