mirror of
https://github.com/vgough/encfs.git
synced 2025-06-20 03:37:50 +02: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
|
operator bool () const
|
||||||
{
|
{
|
||||||
return renameList;
|
return renameList;
|
||||||
@ -414,8 +409,8 @@ DirTraverse DirNode::openDir(const char *plaintextPath)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DirNode::genRenameList( list<RenameEl> &renameList, const char *fromP,
|
bool DirNode::genRenameList( list<RenameEl> &renameList,
|
||||||
const char *toP )
|
const char *fromP, const char *toP )
|
||||||
{
|
{
|
||||||
uint64_t fromIV = 0, toIV = 0;
|
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
|
// Do the rename in two stages to avoid chasing our tail
|
||||||
// Undo everything if we encounter an error!
|
// Undo everything if we encounter an error!
|
||||||
shared_ptr< list<RenameEl> > renameList(new list<RenameEl>);
|
shared_ptr< list<RenameEl> > renameList(new list<RenameEl>);
|
||||||
shared_ptr<RenameOp> op( new RenameOp(this, renameList) );
|
|
||||||
if(!genRenameList( *renameList.get(), fromP, toP ))
|
if(!genRenameList( *renameList.get(), fromP, toP ))
|
||||||
{
|
{
|
||||||
rWarning("Error during generation of recursive rename list");
|
rWarning("Error during generation of recursive rename list");
|
||||||
op.reset();
|
return shared_ptr<RenameOp>();
|
||||||
}
|
} else
|
||||||
|
return shared_ptr<RenameOp>( new RenameOp(this, renameList) );
|
||||||
return op;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user