--- gnome-vfs-2.7.2/libgnomevfs/gnome-vfs-volume-monitor.c 2003-12-04 21:16:55.000000000 +0100 +++ gnome-vfs-2.7.2/libgnomevfs/gnome-vfs-volume-monitor.c 2004-06-19 21:37:17.000000000 +0200 @@ -26,6 +26,7 @@ #include #include "gnome-vfs-private.h" +#include "gnome-vfs-utils.h" #include "gnome-vfs-volume-monitor.h" #include "gnome-vfs-volume-monitor-private.h" #include "gnome-vfs-volume-monitor-daemon.h" @@ -649,22 +650,28 @@ dev_t device; GList *l; GnomeVFSVolume *volume, *res; + char *uri; if (stat (path, &statbuf) != 0) return NULL; device = statbuf.st_dev; + uri = gnome_vfs_get_uri_from_local_path(path); + res = NULL; g_mutex_lock (volume_monitor->priv->mutex); for (l = volume_monitor->priv->mtab_volumes; l != NULL; l = l->next) { volume = l->data; - if (volume->priv->unix_device == device) { + if (volume->priv->unix_device == device && + strncmp(volume->priv->activation_uri,uri,strlen(volume->priv->activation_uri)) == 0) { res = gnome_vfs_volume_ref (volume); break; } } g_mutex_unlock (volume_monitor->priv->mutex); + g_free(uri); + return res; }