summaryrefslogtreecommitdiff
path: root/netfs/fuse
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2019-11-23 13:41:29 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2019-11-23 13:41:29 +0000
commitc8451301c07bf976a121d0af3fb36c0f18084bde (patch)
treeeae4670ace6f97f9e68c3731b4328d5191124814 /netfs/fuse
parentAdd support for rename flags (diff)
downloadnetfs-c8451301c07bf976a121d0af3fb36c0f18084bde.tar.bz2
netfs-c8451301c07bf976a121d0af3fb36c0f18084bde.tar.xz
netfs-c8451301c07bf976a121d0af3fb36c0f18084bde.zip
Simplify directory interface
Removes DirectoryV2, merged into Directory Removes listdir option as Fuse now passes the option into readdir
Diffstat (limited to 'netfs/fuse')
-rw-r--r--netfs/fuse/fuseApp.h1
-rw-r--r--netfs/fuse/fuseConfig.ice3
-rw-r--r--netfs/fuse/fuseDirs.cpp5
3 files changed, 2 insertions, 7 deletions
diff --git a/netfs/fuse/fuseApp.h b/netfs/fuse/fuseApp.h
index d2b645e..ca3e631 100644
--- a/netfs/fuse/fuseApp.h
+++ b/netfs/fuse/fuseApp.h
@@ -23,7 +23,6 @@ namespace NetFS {
OpenDir(DirectoryPrxPtr remote, std::string path);
DirectoryPrxPtr remote;
- DirectoryV2PrxPtr remoteV2;
const std::string path;
};
typedef std::shared_ptr<OpenDir> OpenDirPtr;
diff --git a/netfs/fuse/fuseConfig.ice b/netfs/fuse/fuseConfig.ice
index e425c21..52116ea 100644
--- a/netfs/fuse/fuseConfig.ice
+++ b/netfs/fuse/fuseConfig.ice
@@ -20,9 +20,6 @@ module NetFS {
["slicer:name:async"]
bool Async = false;
-
- ["slicer:name:listdir"]
- bool ListDir = true;
};
["slicer:key:name","slicer:value:resource","slicer:item:resource"]
diff --git a/netfs/fuse/fuseDirs.cpp b/netfs/fuse/fuseDirs.cpp
index 490a4bb..d2597f8 100644
--- a/netfs/fuse/fuseDirs.cpp
+++ b/netfs/fuse/fuseDirs.cpp
@@ -5,7 +5,6 @@
namespace NetFS {
FuseApp::OpenDir::OpenDir(DirectoryPrxPtr r, std::string p) :
remote(std::move(r)),
- remoteV2(remote->ice_getFacet() >= "v02" ? Ice::uncheckedCast<DirectoryV2Prx>(remote) : nullptr),
path(std::move(p))
{
}
@@ -52,8 +51,8 @@ FuseApp::readdir(const char * p, void * buf, fuse_fill_dir_t filler, off_t, stru
auto od = getProxy<OpenDirPtr>(fi->fh);
std::string path(p);
auto expiry = time(nullptr) + 2;
- if (flags == FUSE_READDIR_PLUS && fcr->ListDir && od->remoteV2) {
- for (const auto & e : od->remoteV2->listdir()) {
+ 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);