return result;
}
}();
- const auto remotePath = QString(rootPath + _item->_file);
+ const auto remoteFilename = _item->_encryptedFileName.isEmpty() ? _item->_file : _item->_encryptedFileName;
+ const auto remotePath = QString(rootPath + remoteFilename);
const auto remoteParentPath = remotePath.left(remotePath.lastIndexOf('/'));
const auto account = propagator()->account();
!account->e2e()->isFolderEncrypted(remoteParentPath + '/')) {
startAfterIsEncryptedIsChecked();
} else {
- const auto relativeRemotePath = _item->_file;
- const auto slashPosition = relativeRemotePath.lastIndexOf('/');
- const auto relativeRemoteParentPath = slashPosition >= 0 ? relativeRemotePath.left(slashPosition) : QString();
+ const auto slashPosition = remoteFilename.lastIndexOf('/');
+ const auto relativeRemoteParentPath = slashPosition >= 0 ? remoteFilename.left(slashPosition) : QString();
SyncJournalFileRecord parentRec;
propagator()->_journal->getFileRecordByE2eMangledName(relativeRemoteParentPath, &parentRec);
return result;
}
}();
- const auto remotePath = QString(rootPath + _item->_file);
+ const auto remoteFilename = _item->_encryptedFileName.isEmpty() ? _item->_file : _item->_encryptedFileName;
+ const auto remotePath = QString(rootPath + remoteFilename);
const auto remoteParentPath = remotePath.left(remotePath.lastIndexOf('/'));
auto getEncryptedStatus = new GetFolderEncryptStatusJob(_propagator->account(), remoteParentPath, this);
for (const EncryptedFile &file : files) {
if (encryptedFilename == file.encryptedFilename) {
_encryptedInfo = file;
- _item->_encryptedFileName = _item->_file;
+ if (_item->_encryptedFileName.isEmpty()) {
+ _item->_encryptedFileName = _item->_file;
+ }
if (!_localParentPath.isEmpty()) {
_item->_file = _localParentPath + QLatin1Char('/') + _encryptedInfo.originalFilename;
} else {