mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-22 13:05:51 +03:00
Merge pull request #3928 from nextcloud/bugfix/fixE2EEMetaData
properly extract the file id when querying server
This commit is contained in:
commit
e4eaf9d88d
2 changed files with 6 additions and 1 deletions
|
@ -351,6 +351,7 @@ void DiscoverySingleDirectoryJob::start()
|
|||
<< "getetag"
|
||||
<< "http://owncloud.org/ns:size"
|
||||
<< "http://owncloud.org/ns:id"
|
||||
<< "http://owncloud.org/ns:fileid"
|
||||
<< "http://owncloud.org/ns:downloadURL"
|
||||
<< "http://owncloud.org/ns:dDC"
|
||||
<< "http://owncloud.org/ns:permissions"
|
||||
|
@ -453,6 +454,9 @@ void DiscoverySingleDirectoryJob::directoryListingIteratedSlot(const QString &fi
|
|||
_dataFingerprint = "[empty]";
|
||||
}
|
||||
}
|
||||
if (map.contains(QStringLiteral("fileid"))) {
|
||||
_localFileId = map.value(QStringLiteral("fileid")).toUtf8();
|
||||
}
|
||||
if (map.contains("id")) {
|
||||
_fileId = map.value("id").toUtf8();
|
||||
}
|
||||
|
@ -529,7 +533,7 @@ void DiscoverySingleDirectoryJob::lsJobFinishedWithErrorSlot(QNetworkReply *r)
|
|||
|
||||
void DiscoverySingleDirectoryJob::fetchE2eMetadata()
|
||||
{
|
||||
auto job = new GetMetadataApiJob(_account, _fileId);
|
||||
const auto job = new GetMetadataApiJob(_account, _localFileId);
|
||||
connect(job, &GetMetadataApiJob::jsonReceived,
|
||||
this, &DiscoverySingleDirectoryJob::metadataReceived);
|
||||
connect(job, &GetMetadataApiJob::error,
|
||||
|
|
|
@ -144,6 +144,7 @@ private:
|
|||
QString _subPath;
|
||||
QByteArray _firstEtag;
|
||||
QByteArray _fileId;
|
||||
QByteArray _localFileId;
|
||||
AccountPtr _account;
|
||||
// The first result is for the directory itself and need to be ignored.
|
||||
// This flag is true if it was already ignored.
|
||||
|
|
Loading…
Reference in a new issue