Lines 26-31
Link Here
|
26 |
#include <string.h> |
26 |
#include <string.h> |
27 |
|
27 |
|
28 |
#include "gnome-vfs-private.h" |
28 |
#include "gnome-vfs-private.h" |
|
|
29 |
#include "gnome-vfs-utils.h" |
29 |
#include "gnome-vfs-volume-monitor.h" |
30 |
#include "gnome-vfs-volume-monitor.h" |
30 |
#include "gnome-vfs-volume-monitor-private.h" |
31 |
#include "gnome-vfs-volume-monitor-private.h" |
31 |
#include "gnome-vfs-volume-monitor-daemon.h" |
32 |
#include "gnome-vfs-volume-monitor-daemon.h" |
Lines 649-670
Link Here
|
649 |
dev_t device; |
650 |
dev_t device; |
650 |
GList *l; |
651 |
GList *l; |
651 |
GnomeVFSVolume *volume, *res; |
652 |
GnomeVFSVolume *volume, *res; |
|
|
653 |
char *uri; |
652 |
|
654 |
|
653 |
if (stat (path, &statbuf) != 0) |
655 |
if (stat (path, &statbuf) != 0) |
654 |
return NULL; |
656 |
return NULL; |
655 |
|
657 |
|
656 |
device = statbuf.st_dev; |
658 |
device = statbuf.st_dev; |
657 |
|
659 |
|
|
|
660 |
uri = gnome_vfs_get_uri_from_local_path(path); |
661 |
|
658 |
res = NULL; |
662 |
res = NULL; |
659 |
g_mutex_lock (volume_monitor->priv->mutex); |
663 |
g_mutex_lock (volume_monitor->priv->mutex); |
660 |
for (l = volume_monitor->priv->mtab_volumes; l != NULL; l = l->next) { |
664 |
for (l = volume_monitor->priv->mtab_volumes; l != NULL; l = l->next) { |
661 |
volume = l->data; |
665 |
volume = l->data; |
662 |
if (volume->priv->unix_device == device) { |
666 |
if (volume->priv->unix_device == device && |
|
|
667 |
strncmp(volume->priv->activation_uri,uri,strlen(volume->priv->activation_uri)) == 0) { |
663 |
res = gnome_vfs_volume_ref (volume); |
668 |
res = gnome_vfs_volume_ref (volume); |
664 |
break; |
669 |
break; |
665 |
} |
670 |
} |
666 |
} |
671 |
} |
667 |
g_mutex_unlock (volume_monitor->priv->mutex); |
672 |
g_mutex_unlock (volume_monitor->priv->mutex); |
668 |
|
673 |
|
|
|
674 |
g_free(uri); |
675 |
|
669 |
return res; |
676 |
return res; |
670 |
} |
677 |
} |