[gvfs] udisks2: Fix UUID matching
- From: Ondrej Holy <oholy src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gvfs] udisks2: Fix UUID matching
- Date: Tue, 20 Feb 2018 08:38:30 +0000 (UTC)
commit 76e4121c05bd81cf005d714554b8085686101de2
Author: Ondrej Holy <oholy redhat com>
Date: Mon Feb 19 18:01:18 2018 +0100
udisks2: Fix UUID matching
"device + 6" is used to skip "UUID=" prefix in the string, but it
should be "device + 5" since it has only 5 chars.
https://bugzilla.gnome.org/show_bug.cgi?id=793545
monitor/udisks2/gvfsudisks2volumemonitor.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/monitor/udisks2/gvfsudisks2volumemonitor.c b/monitor/udisks2/gvfsudisks2volumemonitor.c
index c6a3f47..fab7ccd 100644
--- a/monitor/udisks2/gvfsudisks2volumemonitor.c
+++ b/monitor/udisks2/gvfsudisks2volumemonitor.c
@@ -1206,7 +1206,7 @@ find_volume_for_device (GVfsUDisks2VolumeMonitor *monitor,
}
else if (g_str_has_prefix (device, "UUID="))
{
- blocks = udisks_client_get_block_for_uuid (monitor->client, device + 6);
+ blocks = udisks_client_get_block_for_uuid (monitor->client, device + 5);
if (blocks != NULL)
device = udisks_block_get_device (UDISKS_BLOCK (blocks->data));
else
@@ -1479,7 +1479,7 @@ mount_point_has_device (GVfsUDisks2VolumeMonitor *monitor,
}
else if (g_str_has_prefix (device, "UUID="))
{
- blocks = udisks_client_get_block_for_uuid (monitor->client, device + 6);
+ blocks = udisks_client_get_block_for_uuid (monitor->client, device + 5);
if (blocks != NULL)
device = udisks_block_get_device (UDISKS_BLOCK (blocks->data));
else
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]