diff options
| author | Dan Goodliffe <dan@randomdan.homeip.net> | 2019-09-10 00:35:42 +0100 | 
|---|---|---|
| committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2019-09-10 00:35:42 +0100 | 
| commit | db77e3a4742caf9f4ee18bc71c194edccb0f9d63 (patch) | |
| tree | a40391fdcdd154854aaf7a56344a510d70278ea5 | |
| parent | Get glibmm and fuse flags from pkg-config (diff) | |
| download | netfs-db77e3a4742caf9f4ee18bc71c194edccb0f9d63.tar.bz2 netfs-db77e3a4742caf9f4ee18bc71c194edccb0f9d63.tar.xz netfs-db77e3a4742caf9f4ee18bc71c194edccb0f9d63.zip  | |
Fix listdir and caching of stats
| -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 {  | 
