GNOME Bugzilla – Bug 96722
Nautilus failing to show media with same label as another mounted media
Last modified: 2005-06-20 12:27:40 UTC
1) Insert a floppy disk. 2) Select floppy icon on backdrop, right click, and select 'Format'. gmedia_format application gets launched. 4) Chose UFS as filesystem, label the disk 'hello' and click Apply. 5) After format complete's, and floppy icon labeled 'hello' is on backdrop. 6) Now insert a zip drive, right-click and select Format. gemdia_format dialog appears. 7) Chose UFS as filesystem, label the disk 'hello' and click Apply. Format complete's, zip disk labeled 'hello' is not shown on backdrop although it has been formatted and remounted, notification file in /tmp/.removable is present.
The above bug description may not make sense to community. But this problem is there in comunity code as well. Here are the steps to reproduce the problem: a) Insert a zip media with label say "Hello". Nautilus shows the media icon on the desktop. b) Now insert a floppy media which has label say "Hello#1" and mount it. Now nautilus does not show the floppy media icon on the desktop. Instead nautilus hangs. The problem is there in nautilus code. src/file-manager/fm-desktop-icon-view.c: create_unique_volume_name() volume_name = nautilus_volume_get_name (volume); uri_path = g_strdup_printf ("%s/%s", desktop_directory, volume_name); uri = gnome_vfs_uri_new (uri_path); /* Check for existing filename and create a unique name. */ while (gnome_vfs_uri_exists (uri)) { gnome_vfs_uri_unref (uri); g_free (uri_path); index++; g_free (new_name); new_name = g_strdup_printf ("%s (%d)", volume_name, index); uri_path = g_strdup_printf ("%s/%s", desktop_directory, new_name); uri = gnome_vfs_uri_new (uri_path); } Zip media with label "Hello" already present. When floppy media is mounted with label "Hello#1", volume_name it gets is "Hello#1". Now the uri created with the label "Hello#1" will have text as Hello(which already exists because of media) and '1' as fragment. And the while will be in infinite loop to find out a new name for the fllopy media, which causes nautilus to hang. Solution it to escape the volume_name to take care of special characters.
Created attachment 11842 [details] [review] proposed patch which escapes volume name
The code has changed so it seems this patch doesn't apply any longer. Is the problem still there?
Yeah, the patch does not apply anymore as the code had changed. So it may not be relavent now. But I am not sure if the bug is resolved with the new nautilus. The test cases are for Removable media devices on Solaris. I need to have nautilus HEAD running on Solaris box, where I can connect floppy and ZIP drives. I will build nautilus head on Solaris and test it. I will close the bug if it is resolved.
*** Bug 84656 has been marked as a duplicate of this bug. ***
I still need to evaluate the bug on HEAD. I will let you know if the problem is still there or fixed with the new volume manager code.
Comment on attachment 11842 [details] [review] proposed patch which escapes volume name gonna mark the patch as obsolete then, thanks
any news on this bug?
The problem is not seen in 2.10 Nautilus on Linux. Volume names seem to have been taken care of special characters. Closing the bug.