diff options
author | Tor Lillqvist <tml@novell.com> | 2005-01-23 00:06:24 +0000 |
---|---|---|
committer | Tor Lillqvist <tml@src.gnome.org> | 2005-01-23 00:06:24 +0000 |
commit | 017f6ed28215b9a7ddff34c2b8b42d002a100213 (patch) | |
tree | af928b2eb0ae4bad7f264e3d2034890b664f588f /gtk/gtkfilesystemwin32.c | |
parent | f2b3c22d5c6fedcd29c6ba82a76a43e3d15b9ff7 (diff) | |
download | gtk+-017f6ed28215b9a7ddff34c2b8b42d002a100213.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/gtkfilesystemwin32.c')
-rw-r--r-- | gtk/gtkfilesystemwin32.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gtk/gtkfilesystemwin32.c b/gtk/gtkfilesystemwin32.c index ff366aa0de..4555299d91 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); |