mirror of
https://github.com/nextcloud/desktop.git
synced 2024-12-13 06:52:39 +03:00
[CSE] Unlock the folder after a lock
This makes sure the folder will be unlocked for next tests
This commit is contained in:
parent
33b1fcfe66
commit
e6f835d138
2 changed files with 16 additions and 1 deletions
|
@ -290,6 +290,20 @@ void PropagateUploadFileCommon::slotFolderLockedSuccessfully(const QByteArray& f
|
|||
void PropagateUploadFileCommon::slotFolderEncriptedMetadataReceived(const QJsonDocument &json, int statusCode)
|
||||
{
|
||||
qDebug() << "Metadata Received" << json.toVariant();
|
||||
auto *unlockJob = new UnlockEncryptFolderApiJob(propagator()->account(), _folderId, _folderToken, this);
|
||||
connect(unlockJob, &UnlockEncryptFolderApiJob::success, this, &PropagateUploadFileCommon::slotUnlockEncryptedFolderSuccess);
|
||||
connect(unlockJob, &UnlockEncryptFolderApiJob::error, this, &PropagateUploadFileCommon::slotUnlockEncryptedFolderError);
|
||||
unlockJob->start();
|
||||
}
|
||||
|
||||
void PropagateUploadFileCommon::slotUnlockEncryptedFolderSuccess(const QByteArray& fileId)
|
||||
{
|
||||
qDebug() << "Unlock Job worked for folder " << fileId;
|
||||
}
|
||||
|
||||
void PropagateUploadFileCommon::slotUnlockEncryptedFolderError(const QByteArray& fileId, int httpStatusCode)
|
||||
{
|
||||
qDebug() << "There was an error unlocking " << fileId << httpStatusCode;
|
||||
}
|
||||
|
||||
void PropagateUploadFileCommon::slotFolderLockedError(const QByteArray& fileId, int httpErrorCode)
|
||||
|
|
|
@ -287,7 +287,8 @@ private slots:
|
|||
void slotFolderLockedError(const QByteArray& fileId, int httpErrorCode);
|
||||
void slotTryLock(const QByteArray& fileId);
|
||||
void slotFolderEncriptedMetadataReceived(const QJsonDocument &json, int statusCode);
|
||||
|
||||
void slotUnlockEncryptedFolderSuccess(const QByteArray& fileId);
|
||||
void slotUnlockEncryptedFolderError(const QByteArray& fileId, int httpReturnCode);
|
||||
// Private Encryption Stuff
|
||||
private:
|
||||
QElapsedTimer _folderLockFirstTry;
|
||||
|
|
Loading…
Reference in a new issue