From 743543f14fbd3c11059cf2ca562019798bfc72c8 Mon Sep 17 00:00:00 2001 From: Hubert Figuiere Date: Wed, 20 Sep 2006 00:46:18 +0000 Subject: [PATCH] * disk.c (gp_port_library_list): ignore FUSE filesystem entries. git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@9195 67ed7778-7388-44ab-90cf-0a291f65f57c --- libgphoto2_port/disk/ChangeLog | 5 +++++ libgphoto2_port/disk/disk.c | 16 ++++++++++------ 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/libgphoto2_port/disk/ChangeLog b/libgphoto2_port/disk/ChangeLog index b36e5208b..439418770 100644 --- a/libgphoto2_port/disk/ChangeLog +++ b/libgphoto2_port/disk/ChangeLog @@ -1,3 +1,8 @@ +2006-09-19 Hubert Figuiere + + * disk.c (gp_port_library_list): ignore FUSE filesystem + entries. + 2005-06-15 Hubert Figuiere * disk.c (gp_port_library_list): unref the dbus connection diff --git a/libgphoto2_port/disk/disk.c b/libgphoto2_port/disk/disk.c index 8484b6e3b..1f5256ec8 100644 --- a/libgphoto2_port/disk/disk.c +++ b/libgphoto2_port/disk/disk.c @@ -203,10 +203,12 @@ gp_port_library_list (GPPortInfoList *list) if (mnt) { while ((mntent = getmntent (mnt))) { /* detect floppies so we don't access them with the stat() below */ - if ( (NULL != strstr(mntent->mnt_fsname,"fd")) || - (NULL != strstr(mntent->mnt_fsname,"floppy")) - ) + if ((NULL != strstr(mntent->mnt_fsname,"fd")) || + (NULL != strstr(mntent->mnt_fsname,"floppy")) || + (NULL != strstr(mntent->mnt_fsname, "fuse"))) + { continue; + } snprintf (path, sizeof(path), "%s/DCIM", mntent->mnt_dir); if (-1 == stat(path, &stbuf)) { @@ -226,10 +228,12 @@ gp_port_library_list (GPPortInfoList *list) if (mnt) { while ((mntent = getmntent (mnt))) { /* detect floppies so we don't access them with the stat() below */ - if ( (NULL != strstr(mntent->mnt_fsname,"fd")) || - (NULL != strstr(mntent->mnt_fsname,"floppy")) - ) + if ((NULL != strstr(mntent->mnt_fsname,"fd")) || + (NULL != strstr(mntent->mnt_fsname,"floppy")) || + (NULL != strstr(mntent->mnt_fsname, "fuse"))) + { continue; + } snprintf (path, sizeof(path), "%s/DCIM", mntent->mnt_dir); if (-1 == stat(path, &stbuf)) {