Gnome-VFS hal patch - found reason for computer vfolder crash

David Zeuthen david at
Thu Jun 3 12:06:37 PDT 2004


It is probably better to discuss this at utopia-list at, but,

On Wed, Jun 02, 2004 at 10:44:10PM -0400, John (J5) Palmieri wrote:
> I have finally tracked down the mysterious cause of the Computer
> v-folder crashing in the hal patch for Gnome-VFS.  It seems that the
> display name is being encoded and used as the uri in the do_open
> function in computer-method.c.  This causes problems with my / and /boot
> mounts because they are encoded such as %2Fboot (%2F = '/').
> gnome_vfs_uri_extract_short_name calls gnome_vfs_unescape_string and
> specifies that '/' is an illegal character.  
> gnome_vfs_unescape_string subsequently returns a NULL because it
> encountered the escaped '/' sequence.  This NULL is then strcmp'ed in
> do_open which causes the crash.

Nice catch.

> I am not sure what the best way to fix this is.  Should it be fixed in
> the computer module, libgnome-vfs or hal patch? Should all Unix mounts
> just be taken out of the equation (/ and /boot are set not to be user
> visible, why put them into the list of drives)?  Can we simply replace
> the '/' with some other character?  Is there a better way we can name
> volumes?
>  Can we decouple the uri used by do_open and the display name? 
> Just a couple of questions I wanted to throw out before I go ahead and
> fix this.

I think we should find a better way to name the devices. However, that
is really a decision for the gnome-vfs maintainer. My personal take is
that volumes on standard UNIX mount points should be hidden, while
volumes on other mounts points should be shown and named accordingly,
e.g. a hfsplus volume might be called "MacOS volume" or something.

On a further note, I've discussed with Alex (the gnome-vfs maintainer)
on how to best change the patch so it works without automounting and
such that it exposes the drives rather than just the volumes. We
concluded this requires gnome-vfs changes and he is prepared to allow
these - I'll bugzilla the entry and post my latest patch to
utopia-list when I get home from the UK; expect it sometime saturday.

If you have any patch against the latest published patch to address
the issues you raised please send it to me and I'll incorporate it.


hal mailing list
hal at

More information about the Hal mailing list