summaryrefslogtreecommitdiff
path: root/gtk
diff options
context:
space:
mode:
authorTor Lillqvist <tml@novell.com>2005-01-23 00:09:00 +0000
committerTor Lillqvist <tml@src.gnome.org>2005-01-23 00:09:00 +0000
commitb7124b938c0457acb324f4f7e0a3067bbbc05c94 (patch)
tree602cf6c40e69b26b125acc70f09ad9b49c3ef235 /gtk
parente23002b7f44f0b4c5b2f94707297c625f004e912 (diff)
downloadgdk-pixbuf-b7124b938c0457acb324f4f7e0a3067bbbc05c94.tar.gz
Don't call GetVolumeInformation() for network drives. They might be
2005-01-23 Tor Lillqvist <tml@novell.com> * gtk/gtkfilesystemwin32.c (gtk_file_system_win32_volume_get_display_name): Don't call GetVolumeInformation() for network drives. They might be disconnected, and calling GetVolumeInformation() will then cause long delays. (#164448) It seems to be very hard to reliably find out whether a network drive is connected or not, so it's easier to just not try getting the volume name for them. See the bug report for discussion.
Diffstat (limited to 'gtk')
-rw-r--r--gtk/gtkfilesystemwin32.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gtk/gtkfilesystemwin32.c b/gtk/gtkfilesystemwin32.c
index ff366aa0d..4555299d9 100644
--- a/gtk/gtkfilesystemwin32.c
+++ b/gtk/gtkfilesystemwin32.c
@@ -606,7 +606,10 @@ gtk_file_system_win32_volume_get_display_name (GtkFileSystem *file_system,
g_return_val_if_fail (volume->drive != NULL, NULL);
- if ((filename_is_drive_root (volume->drive) && volume->drive[0] >= 'C') ||
+ if (filename_is_drive_root (volume->drive) &&
+ volume->drive_type == DRIVE_REMOTE)
+ real_display_name = g_strdup (volume->drive);
+ else if ((filename_is_drive_root (volume->drive) && volume->drive[0] >= 'C') ||
volume->drive_type != DRIVE_REMOVABLE)
{
gunichar2 *wdrive = g_utf8_to_utf16 (volume->drive, -1, NULL, NULL, NULL);