diff options
Diffstat (limited to 'netfs/fuse/fuseDirs.cpp')
-rw-r--r-- | netfs/fuse/fuseDirs.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/netfs/fuse/fuseDirs.cpp b/netfs/fuse/fuseDirs.cpp index c1a91bd..d23f5d7 100644 --- a/netfs/fuse/fuseDirs.cpp +++ b/netfs/fuse/fuseDirs.cpp @@ -50,13 +50,16 @@ namespace NetFS { auto expiry = time(nullptr) + 2; if (flags == FUSE_READDIR_PLUS) { for (const auto & e : od->remote->listdir()) { - filler(buf, e.first.c_str(), nullptr, 0, FUSE_FILL_DIR_PLUS); - std::string k(path + e.first); - statCache.remove(k); - statCache.add(k, converter.convert(e.second), expiry); + if (auto stat = converter.convert(e.second); stat.st_mode) { + filler(buf, e.first.c_str(), nullptr, 0, FUSE_FILL_DIR_PLUS); + std::string k(path + e.first); + statCache.remove(k); + statCache.add(k, std::move(stat), expiry); + } } } else { + // Standard read dir cannot know the local system cannot represent the inode for (const auto & e : od->remote->readdir()) { filler(buf, e.c_str(), nullptr, 0, (fuse_fill_dir_flags)0); } |