mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-22 21:15:55 +03:00
ignore encrypted items during discovery when encryption is disabled
when we know a folder should be encrypted but encryption client side app is disabled, ignore any items in the encrypted folders Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
This commit is contained in:
parent
a270dca344
commit
863256fd55
2 changed files with 11 additions and 1 deletions
|
@ -1664,6 +1664,13 @@ void ProcessDirectoryJob::processFileFinalize(
|
|||
const SyncFileItemPtr &item, PathTuple path, bool recurse,
|
||||
QueryMode recurseQueryLocal, QueryMode recurseQueryServer)
|
||||
{
|
||||
if (item->isEncrypted() && !_discoveryData->_account->capabilities().clientSideEncryptionAvailable()) {
|
||||
item->_instruction = CSyncEnums::CSYNC_INSTRUCTION_IGNORE;
|
||||
item->_direction = SyncFileItem::None;
|
||||
emit _discoveryData->itemDiscovered(item);
|
||||
return;
|
||||
}
|
||||
|
||||
// Adjust target path for virtual-suffix files
|
||||
if (isVfsWithSuffix()) {
|
||||
if (item->_type == ItemTypeVirtualFile) {
|
||||
|
|
|
@ -623,10 +623,13 @@ void DiscoverySingleDirectoryJob::lsJobFinishedWithoutErrorSlot()
|
|||
emit finished(HttpError{ 0, _error });
|
||||
deleteLater();
|
||||
return;
|
||||
} else if (isE2eEncrypted()) {
|
||||
} else if (isE2eEncrypted() && _account->capabilities().clientSideEncryptionAvailable()) {
|
||||
emit etag(_firstEtag, QDateTime::fromString(QString::fromUtf8(_lsColJob->responseTimestamp()), Qt::RFC2822Date));
|
||||
fetchE2eMetadata();
|
||||
return;
|
||||
} else if (isE2eEncrypted() && !_account->capabilities().clientSideEncryptionAvailable()) {
|
||||
emit etag(_firstEtag, QDateTime::fromString(QString::fromUtf8(_lsColJob->responseTimestamp()), Qt::RFC2822Date));
|
||||
emit finished(_results);
|
||||
}
|
||||
emit etag(_firstEtag, QDateTime::fromString(QString::fromUtf8(_lsColJob->responseTimestamp()), Qt::RFC2822Date));
|
||||
emit finished(_results);
|
||||
|
|
Loading…
Reference in a new issue