mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-04-18 21:29:16 +02:00
Merge branch 'w32-mount-sort' into 'master'
GWin32VolumeMonitor: Sort the volumes correctly See merge request GNOME/glib!669
This commit is contained in:
commit
843a0422ab
@ -111,7 +111,7 @@ get_mounts (GVolumeMonitor *volume_monitor)
|
|||||||
{
|
{
|
||||||
DWORD drives;
|
DWORD drives;
|
||||||
gchar drive[4] = "A:\\";
|
gchar drive[4] = "A:\\";
|
||||||
GList *list = NULL;
|
GQueue queue = G_QUEUE_INIT;
|
||||||
|
|
||||||
drives = get_viewable_logical_drives ();
|
drives = get_viewable_logical_drives ();
|
||||||
|
|
||||||
@ -121,13 +121,13 @@ get_mounts (GVolumeMonitor *volume_monitor)
|
|||||||
while (drives && drive[0] <= 'Z')
|
while (drives && drive[0] <= 'Z')
|
||||||
{
|
{
|
||||||
if (drives & 1)
|
if (drives & 1)
|
||||||
{
|
g_queue_push_tail (&queue, _g_win32_mount_new (volume_monitor, drive, NULL));
|
||||||
list = g_list_prepend (list, _g_win32_mount_new (volume_monitor, drive, NULL));
|
|
||||||
}
|
|
||||||
drives >>= 1;
|
drives >>= 1;
|
||||||
drive[0]++;
|
drive[0]++;
|
||||||
}
|
}
|
||||||
return list;
|
|
||||||
|
return g_steal_pointer (&queue.head);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* actually 'mounting' volumes is out of GIOs business on win32, so no volumes are delivered either */
|
/* actually 'mounting' volumes is out of GIOs business on win32, so no volumes are delivered either */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user