From d73fa807875951d0240dce572398992d395bbe77 Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Sun, 9 Feb 2003 21:51:27 +0000 Subject: Use GetDriveType() to recognize removable drives (in order to avoid 2003-02-09 Tor Lillqvist * gtk/gtkfilesel.c (win32_gtk_add_drives_to_dir_list): Use GetDriveType() to recognize removable drives (in order to avoid hanging if trying to access an empty floppy drive), instead of hardcoding A: and B: (#105654). --- gtk/gtkfilesel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gtk') diff --git a/gtk/gtkfilesel.c b/gtk/gtkfilesel.c index b3e42307a0..4fcb54a304 100644 --- a/gtk/gtkfilesel.c +++ b/gtk/gtkfilesel.c @@ -2059,7 +2059,7 @@ win32_gtk_add_drives_to_dir_list (GtkListStore *model) while (*textPtr != '\0') { /* Ignore floppies (?) */ - if ((tolower (textPtr[0]) != 'a') && (tolower (textPtr[0]) != 'b')) + if (GetDriveType (textPtr) != DRIVE_REMOVABLE) { /* Build the actual displayable string */ g_snprintf (formatBuffer, sizeof (formatBuffer), "%c:\\", toupper (textPtr[0])); -- cgit v1.2.1