[tracker-miners/wip/carlosg/volume-indexing-fixes: 4/6] tracker-miner-fs: Check on the GDrive that it holds removable volumes




commit 8914aeade28b81948fec4ca6c954474f41bcd472
Author: Carlos Garnacho <carlosg gnome org>
Date:   Sat Aug 15 23:05:17 2020 +0200

    tracker-miner-fs: Check on the GDrive that it holds removable volumes
    
    A volume can not always be mounted, but a GDrive will consistently know
    that it holds removable devices.
    
    Fixes mishaps I see sometimes on USB stick insertion, that the volume
    is added (g_volume_can_mount returns true), removed, and added again
    (g_volume_can_mount returns false this time at the time of querying).
    This makes us reliably end up deeming the mount as coming from a
    removable device the second time it comes up, thus ending up with it
    added for indexing.

 src/miners/fs/tracker-storage.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/miners/fs/tracker-storage.c b/src/miners/fs/tracker-storage.c
index 348c3284d..0a148ca5e 100644
--- a/src/miners/fs/tracker-storage.c
+++ b/src/miners/fs/tracker-storage.c
@@ -624,7 +624,7 @@ mount_add (TrackerStorage *storage,
                        if (drive) {
                                /* We can't mount/unmount system volumes, so tag
                                 * them as non removable. */
-                               is_removable = g_volume_can_mount (volume);
+                               is_removable = g_drive_is_media_removable (drive);
                                g_debug ("  Found mount with volume and drive which %s be mounted: "
                                         "Assuming it's %s removable, if wrong report a bug!",
                                         is_removable ? "can" : "cannot",


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