mirror of
https://github.com/vgough/encfs.git
synced 2024-11-21 23:43:26 +01:00
fix directory rename issue (launchpad bug #183358)
git-svn-id: http://encfs.googlecode.com/svn/trunk@5 db9cf616-1c43-0410-9cb8-a902689de0d6
This commit is contained in:
parent
3bca27862e
commit
b46543c204
@ -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<RenameEl> &renameList, const char *fromP,
|
||||
const char *toP )
|
||||
bool DirNode::genRenameList( list<RenameEl> &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<RenameEl> > renameList(new list<RenameEl>);
|
||||
shared_ptr<RenameOp> 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<RenameOp>();
|
||||
} else
|
||||
return shared_ptr<RenameOp>( new RenameOp(this, renameList) );
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user