diff options
author | Tor Lillqvist <tml@iki.fi> | 2003-02-09 21:51:27 +0000 |
---|---|---|
committer | Tor Lillqvist <tml@src.gnome.org> | 2003-02-09 21:51:27 +0000 |
commit | d73fa807875951d0240dce572398992d395bbe77 (patch) | |
tree | 15f81662b375b99a8e52095f9c474ec1a91cfbe9 /gtk/gtkfilesel.c | |
parent | b9da30bc62e5c7e70569d8e78aed0c9062879559 (diff) | |
download | gtk+-d73fa807875951d0240dce572398992d395bbe77.tar.gz |
Use GetDriveType() to recognize removable drives (in order to avoid
2003-02-09 Tor Lillqvist <tml@iki.fi>
* 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).
Diffstat (limited to 'gtk/gtkfilesel.c')
-rw-r--r-- | gtk/gtkfilesel.c | 2 |
1 files changed, 1 insertions, 1 deletions
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])); |