From 8bdf4f3dadd4fec0393992e7f20d0f648a64cc94 Mon Sep 17 00:00:00 2001 From: csoler Date: Fri, 3 Mar 2017 23:28:35 +0100 Subject: [PATCH] fixed sharing of sshfs mounted dirs by allowing files of type DT_UNKNOWN to be explored --- libretroshare/src/util/folderiterator.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libretroshare/src/util/folderiterator.cc b/libretroshare/src/util/folderiterator.cc index 0f9ffb89f..eb70ab791 100644 --- a/libretroshare/src/util/folderiterator.cc +++ b/libretroshare/src/util/folderiterator.cc @@ -124,9 +124,9 @@ bool FolderIterator::updateFileInfo(bool& should_skip) return true ; } } - else if( ent->d_type != DT_DIR && ent->d_type != DT_REG) + else if( ent->d_type != DT_DIR && ent->d_type != DT_REG && ent->d_type != DT_UNKNOWN) // DT_UNKNOWN is reported by mounted dirs, by services such as sshfs. { - std::cerr << "(II) Skipping file of unknown type " << ent->d_type << ": " << mFullPath << std::endl; + std::cerr << "(II) Skipping file of unknown type " << std::dec << (int)ent->d_type << std::dec << ": " << mFullPath << std::endl; should_skip = true ; return true ; }