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.
This commit is contained in:
Tor Lillqvist
2005-01-23 00:09:00 +00:00
committed by Tor Lillqvist
parent e23002b7f4
commit b7124b938c
4 changed files with 34 additions and 1 deletions

View File

@@ -1,3 +1,13 @@
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.
2005-01-20 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkdialog.c (gtk_dialog_map): Don't loop forever

View File

@@ -1,3 +1,13 @@
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.
2005-01-20 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkdialog.c (gtk_dialog_map): Don't loop forever

View File

@@ -1,3 +1,13 @@
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.
2005-01-20 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkdialog.c (gtk_dialog_map): Don't loop forever

View File

@@ -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);