After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 96722 - Nautilus failing to show media with same label as another mounted media
Nautilus failing to show media with same label as another mounted media
Status: RESOLVED FIXED
Product: nautilus
Classification: Core
Component: Desktop
unspecified
Other Solaris
: Normal normal
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
: 84656 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2002-10-24 16:25 UTC by Narayana Pattipati
Modified: 2005-06-20 12:27 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
proposed patch which escapes volume name (3.00 KB, patch)
2002-10-26 08:13 UTC, Narayana Pattipati
none Details | Review

Description Narayana Pattipati 2002-10-24 16:25:09 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.
Comment 1 Narayana Pattipati 2002-10-26 07:30:28 UTC
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.
Comment 2 Narayana Pattipati 2002-10-26 08:13:56 UTC
Created attachment 11842 [details] [review]
proposed patch which escapes volume name
Comment 3 Kjartan Maraas 2003-10-30 22:27:33 UTC
The code has changed so it seems this patch doesn't apply any longer.
Is the problem still there?
Comment 4 Narayana Pattipati 2003-11-24 12:16:25 UTC
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.
Comment 5 Sebastien Bacher 2003-11-28 22:31:24 UTC
*** Bug 84656 has been marked as a duplicate of this bug. ***
Comment 6 Narayana Pattipati 2004-02-21 08:09:36 UTC
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 7 Dave Camp 2004-04-28 19:11:22 UTC
Comment on attachment 11842 [details] [review]
proposed patch which escapes volume name

gonna mark the patch as obsolete then, thanks
Comment 8 Sebastien Bacher 2005-06-19 14:01:34 UTC
any news on this bug?
Comment 9 Narayana Pattipati 2005-06-20 12:26:26 UTC
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.