diff --git a/encfs/DirNode.cpp b/encfs/DirNode.cpp index 1c5bf75..5bcefd4 100644 --- a/encfs/DirNode.cpp +++ b/encfs/DirNode.cpp @@ -203,11 +203,6 @@ public: } } - void reset() - { - renameList.reset(); - } - operator bool () const { return renameList; @@ -414,8 +409,8 @@ DirTraverse DirNode::openDir(const char *plaintextPath) } } -bool DirNode::genRenameList( list &renameList, const char *fromP, - const char *toP ) +bool DirNode::genRenameList( list &renameList, + const char *fromP, const char *toP ) { uint64_t fromIV = 0, toIV = 0; @@ -540,14 +535,12 @@ DirNode::newRenameOp( const char *fromP, const char *toP ) // Do the rename in two stages to avoid chasing our tail // Undo everything if we encounter an error! shared_ptr< list > renameList(new list); - shared_ptr op( new RenameOp(this, renameList) ); if(!genRenameList( *renameList.get(), fromP, toP )) { rWarning("Error during generation of recursive rename list"); - op.reset(); - } - - return op; + return shared_ptr(); + } else + return shared_ptr( new RenameOp(this, renameList) ); }