From b46543c2043f9438d3c955ed00a03b0800c9bc7c Mon Sep 17 00:00:00 2001 From: Valient Gough Date: Wed, 16 Jan 2008 03:03:13 +0000 Subject: [PATCH] fix directory rename issue (launchpad bug #183358) git-svn-id: http://encfs.googlecode.com/svn/trunk@5 db9cf616-1c43-0410-9cb8-a902689de0d6 --- encfs/DirNode.cpp | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) 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) ); }