return;
}
- auto job = new OCC::EncryptFolderJob(accountsState()->account(), folderInfo->_path, folderInfo->_fileId, this);
+ // Folder info have directory paths in Foo/Bar/ convention...
+ Q_ASSERT(!folderInfo->_path.startsWith('/') && folderInfo->_path.endsWith('/'));
+ // But EncryptFolderJob expects directory path Foo/Bar convention
+ const auto path = folderInfo->_path.chopped(1);
+
+ auto job = new OCC::EncryptFolderJob(accountsState()->account(), path, folderInfo->_fileId, this);
connect(job, &OCC::EncryptFolderJob::finished, this, &AccountSettings::slotEncryptFolderFinished);
job->start();
}
void EncryptFolderJob::slotEncryptionFlagSuccess(const QByteArray &fileId)
{
- _account->e2e()->setFolderEncryptedStatus(_path, true);
+ _account->e2e()->setFolderEncryptedStatus(_path + '/', true);
auto lockJob = new LockEncryptFolderApiJob(_account, fileId, this);
connect(lockJob, &LockEncryptFolderApiJob::success,
// We're expecting directory path in /Foo/Bar convention...
Q_ASSERT(_job->path().startsWith('/') && !_job->path().endsWith('/'));
// But encryption job expect it in Foo/Bar/ convention
- // (otherwise we won't store the right string in the e2e object)
- const auto path = QString(_job->path().mid(1) + '/');
+ const auto path = _job->path().mid(1);
auto job = new OCC::EncryptFolderJob(propagator()->account(), path, _item->_fileId, this);
connect(job, &OCC::EncryptFolderJob::finished, this, &PropagateRemoteMkdir::slotEncryptFolderFinished);