diff options
-rw-r--r-- | netfs/fuse/fuseDirs.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/netfs/fuse/fuseDirs.cpp b/netfs/fuse/fuseDirs.cpp index 58dab8e..5091d39 100644 --- a/netfs/fuse/fuseDirs.cpp +++ b/netfs/fuse/fuseDirs.cpp @@ -5,7 +5,7 @@ namespace NetFS { FuseApp::OpenDir::OpenDir(DirectoryPrxPtr r, std::string p) : remote(std::move(r)), - remoteV2(remote->ice_getFacet() >= "v02" ? Ice::uncheckedCast<DirectoryV2Prx>(r) : nullptr), + remoteV2(remote->ice_getFacet() >= "v02" ? Ice::uncheckedCast<DirectoryV2Prx>(remote) : nullptr), path(std::move(p)) { } @@ -51,12 +51,13 @@ FuseApp::readdir(const char * p, void * buf, fuse_fill_dir_t filler, off_t, stru try { auto od = getProxy<OpenDirPtr>(fi->fh); std::string path(p); - path += "/"; auto expiry = time(nullptr) + 2; if (fcr->ListDir && od->remoteV2) { for (const auto & e : od->remoteV2->listdir()) { filler(buf, e.first.c_str(), nullptr, 0); - statCache.add(path + e.first, converter.convert(e.second), expiry); + std::string k(path + e.first); + statCache.remove(k); + statCache.add(k, converter.convert(e.second), expiry); } } else { |