--- libgnomevfs/gnome-vfs-volume-monitor.c.old	2004-04-22 18:34:52.000000000 +0200
+++ libgnomevfs/gnome-vfs-volume-monitor.c	2004-04-22 19:35:51.000000000 +0200
@@ -26,6 +26,7 @@
 #include <string.h>
 
 #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;
 }
