diff --git a/encfs/DirNode.cpp b/encfs/DirNode.cpp index 91a6580..18429f1 100644 --- a/encfs/DirNode.cpp +++ b/encfs/DirNode.cpp @@ -742,14 +742,6 @@ shared_ptr DirNode::renameNode( const char *from, const char *to, return node; } -shared_ptr DirNode::directLookup( const char *path ) -{ - return shared_ptr( - new FileNode( this, - fsConfig, - "unknown", path )); -} - shared_ptr DirNode::findOrCreate( const char *plainName) { shared_ptr node; diff --git a/encfs/DirNode.h b/encfs/DirNode.h index 2f413f8..f075a8a 100644 --- a/encfs/DirNode.h +++ b/encfs/DirNode.h @@ -108,10 +108,6 @@ public: shared_ptr openNode( const char *plaintextName, const char *requestor, int flags, int *openResult ); - /* For internal use - open a cipher file directly - */ - shared_ptr directLookup( const char *realPath ); - std::string cipherPath( const char *plaintextPath ); std::string cipherPathWithoutRoot( const char *plaintextPath ); std::string plainPath( const char *cipherPath ); diff --git a/encfs/encfsctl.cpp b/encfs/encfsctl.cpp index a75aa94..369c37a 100644 --- a/encfs/encfsctl.cpp +++ b/encfs/encfsctl.cpp @@ -411,8 +411,9 @@ int processContents( const shared_ptr &rootInfo, if(!node) { - // try opening directly, so a cipher-path can be passed in - node = rootInfo->root->directLookup( path ); + // try treating filename as an enciphered path + string plainName = rootInfo->root->plainPath( path ); + node = rootInfo->root->lookupNode( plainName.c_str(), "encfsctl" ); if(node) { errCode = node->open( O_RDONLY );