mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-26 23:28:14 +03:00
Fix e2ee folder move issue
Signed-off-by: allexzander <blackslayer4@gmail.com>
This commit is contained in:
parent
c34c0f078b
commit
96472320e4
2 changed files with 17 additions and 0 deletions
|
@ -887,6 +887,11 @@ void ProcessDirectoryJob::processFileAnalyzeLocalInfo(
|
|||
qCInfo(lcDisco) << "Not a move, no item in db with inode" << localEntry.inode;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (base._isE2eEncrypted || isInsideEncryptedTree()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (base.isDirectory() != item->isDirectory()) {
|
||||
qCInfo(lcDisco) << "Not a move, types don't match" << base._type << item->_type << localEntry.type;
|
||||
return false;
|
||||
|
@ -1149,6 +1154,7 @@ void ProcessDirectoryJob::processFileFinalize(
|
|||
}
|
||||
if (recurse) {
|
||||
auto job = new ProcessDirectoryJob(path, item, recurseQueryLocal, recurseQueryServer, this);
|
||||
job->setInsideEncryptedTree(isInsideEncryptedTree() || item->_isEncrypted);
|
||||
if (removed) {
|
||||
job->setParent(_discoveryData);
|
||||
_discoveryData->_queuedDeletedDirectories[path._original] = job;
|
||||
|
|
|
@ -88,6 +88,16 @@ public:
|
|||
/** Start up to nbJobs, return the number of job started; emit finished() when done */
|
||||
int processSubJobs(int nbJobs);
|
||||
|
||||
void setInsideEncryptedTree(bool isInsideEncryptedTree)
|
||||
{
|
||||
_isInsideEncryptedTree = isInsideEncryptedTree;
|
||||
}
|
||||
|
||||
bool isInsideEncryptedTree() const
|
||||
{
|
||||
return _isInsideEncryptedTree;
|
||||
}
|
||||
|
||||
SyncFileItemPtr _dirItem;
|
||||
|
||||
private:
|
||||
|
@ -273,6 +283,7 @@ private:
|
|||
bool _childModified = false; // the directory contains modified item what would prevent deletion
|
||||
bool _childIgnored = false; // The directory contains ignored item that would prevent deletion
|
||||
PinState _pinState = PinState::Unspecified; // The directory's pin-state, see computePinState()
|
||||
bool _isInsideEncryptedTree = false; // this directory is encrypted or is within the tree of directories with root directory encrypted
|
||||
|
||||
signals:
|
||||
void finished();
|
||||
|
|
Loading…
Reference in a new issue