* 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
This commit is contained in:
Hubert Figuiere
2006-09-20 00:46:18 +00:00
parent 9beed5b7db
commit 743543f14f
2 changed files with 15 additions and 6 deletions

View File

@@ -1,3 +1,8 @@
2006-09-19 Hubert Figuiere <hub@figuiere.net>
* disk.c (gp_port_library_list): ignore FUSE filesystem
entries.
2005-06-15 Hubert Figuiere <hfiguiere@teaser.fr>
* disk.c (gp_port_library_list): unref the dbus connection

View File

@@ -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)) {