]> git.pld-linux.org Git - packages/gnome-vfs2.git/blob - gnome-vfs2-get_volume_for_path.patch
- fixed in sources
[packages/gnome-vfs2.git] / gnome-vfs2-get_volume_for_path.patch
1 diff -Nur gnome-vfs2-2.10.1cvs20050510.orig/libgnomevfs/gnome-vfs-volume-monitor.c gnome-vfs2-2.10.1cvs20050510/libgnomevfs/gnome-vfs-volume-monitor.c
2 --- gnome-vfs2-2.10.1cvs20050510.orig/libgnomevfs/gnome-vfs-volume-monitor.c    2005-04-21 01:58:14.000000000 +0200
3 +++ gnome-vfs2-2.10.1cvs20050510/libgnomevfs/gnome-vfs-volume-monitor.c 2005-05-10 15:30:29.165933432 +0200
4 @@ -26,6 +26,7 @@
5  #include <string.h>
6  
7  #include "gnome-vfs-private.h"
8 +#include "gnome-vfs-utils.h"
9  #include "gnome-vfs-volume-monitor.h"
10  #include "gnome-vfs-volume-monitor-private.h"
11  #include "gnome-vfs-volume-monitor-client.h"
12 @@ -868,22 +869,28 @@
13         dev_t device;
14         GList *l;
15         GnomeVFSVolume *volume, *res;
16 +       char *uri;
17  
18         if (g_stat (path, &statbuf) != 0)
19                 return NULL;
20  
21         device = statbuf.st_dev;
22  
23 +       uri = gnome_vfs_get_uri_from_local_path(path);
24 +
25         res = NULL;
26         g_mutex_lock (volume_monitor->priv->mutex);
27         for (l = volume_monitor->priv->mtab_volumes; l != NULL; l = l->next) {
28                 volume = l->data;
29 -               if (volume->priv->unix_device == device) {
30 +               if (volume->priv->unix_device == device &&
31 +                   strncmp(volume->priv->activation_uri,uri,strlen(volume->priv->activation_uri)) == 0) {
32                         res = gnome_vfs_volume_ref (volume);
33                         break;
34                 }
35         }
36         g_mutex_unlock (volume_monitor->priv->mutex);
37         
38 +       g_free(uri);
39 +
40         return res;
41  }
This page took 0.113787 seconds and 3 git commands to generate.