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 314490 - Drives are represented twice in gnome-vfs.
Drives are represented twice in gnome-vfs.
Status: RESOLVED FIXED
Product: gnome-vfs
Classification: Deprecated
Component: Other
2.11.x
Other All
: Normal normal
: ---
Assigned To: gnome-vfs maintainers
gnome-vfs maintainers
Depends on:
Blocks:
 
 
Reported: 2005-08-25 20:25 UTC by Robert Love
Modified: 2005-08-29 17:33 UTC
See Also:
GNOME target: ---
GNOME version: 2.11/2.12


Attachments
Proposed patch! (3.29 KB, patch)
2005-08-25 20:35 UTC, Robert Love
committed Details | Review
Small fix. (836 bytes, patch)
2005-08-29 17:33 UTC, Robert Love
none Details | Review

Description Robert Love 2005-08-25 20:25:00 UTC
Drives are represented twice in gnome-vfs (e.g., listed twice in Nautilus) if
they appear in both fstab and in HAL, and the device node listed in HAL is not
the same as the device node listed in HAL.

This can readily happen if fstab contains a symlink, as is common with
"/dev/cdrom" and such.

Fix is simple: Check both the listed device node and its resolved link target
against HAL, before adding as a new device.
Comment 1 Christian Neumair 2005-08-25 20:33:26 UTC
Yup, sounds reasonable.
Comment 2 Robert Love 2005-08-25 20:35:50 UTC
Created attachment 51340 [details] [review]
Proposed patch!

Proposed fix.  Simply checks the target of the symlink, if any, for a match,
too.
Comment 3 Christian Kellner 2005-08-29 05:33:38 UTC
Committed on cvs head. Right before hard code freeze :P Thanks.
Comment 4 Federico Mena Quintero 2005-08-29 17:21:46 UTC
In the patch, where you call readlink() you can't use PATH_MAX-1 bytes, since
"target" already points to the end of the "/dev/" string.
Comment 5 Robert Love 2005-08-29 17:33:17 UTC
Ah, thanks Federico.  Patch attached.
Comment 6 Robert Love 2005-08-29 17:33:41 UTC
Created attachment 51517 [details] [review]
Small fix.