mirror of
https://github.com/nextcloud/desktop.git
synced 2025-10-26 11:17:43 +00:00
Update the item even if we don't call decryptFile()
This way it makes it usable in a directory context. Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
This commit is contained in:
parent
2abc3ce2f5
commit
6dc12166ad
@ -88,6 +88,9 @@ void PropagateDownloadEncrypted::checkFolderEncryptedMetadata(const QJsonDocumen
|
||||
for (const EncryptedFile &file : files) {
|
||||
if (encryptedFilename == file.encryptedFilename) {
|
||||
_encryptedInfo = file;
|
||||
_item->_encryptedFileName = _item->_file;
|
||||
_item->_file = _item->_file.section(QLatin1Char('/'), 0, -2) + QLatin1Char('/') + _encryptedInfo.originalFilename;
|
||||
|
||||
qCDebug(lcPropagateDownloadEncrypted) << "Found matching encrypted metadata for file, starting download";
|
||||
emit folderStatusEncrypted();
|
||||
return;
|
||||
@ -128,13 +131,6 @@ bool PropagateDownloadEncrypted::decryptFile(QFile& tmpFile)
|
||||
// Let's fool the rest of the logic into thinking this was the actual download
|
||||
tmpFile.setFileName(_tmpOutput.fileName());
|
||||
|
||||
//TODO: This seems what's breaking the logic.
|
||||
// Let's fool the rest of the logic into thinking this is the right name of the DAV file
|
||||
_item->_encryptedFileName = _item->_file;
|
||||
_item->_file = _item->_file.section(QLatin1Char('/'), 0, -2)
|
||||
+ QLatin1Char('/') + _encryptedInfo.originalFilename;
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user