mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-26 23:28:14 +03:00
New discovery phase: read the direct download URL and Cookie
This commit is contained in:
parent
ca32eb1cf7
commit
1bcbcd407c
3 changed files with 7 additions and 4 deletions
|
@ -411,6 +411,8 @@ void ProcessDirectoryJob::processFile(PathTuple path,
|
|||
item->_etag = serverEntry.etag;
|
||||
item->_previousSize = localEntry.size;
|
||||
item->_previousModtime = localEntry.modtime;
|
||||
item->_directDownloadUrl = serverEntry.directDownloadUrl;
|
||||
item->_directDownloadCookies = serverEntry.directDownloadCookies;
|
||||
if (!dbEntry.isValid() && !localEntry.isVirtualFile) { // New file on the server
|
||||
item->_instruction = CSYNC_INSTRUCTION_NEW;
|
||||
item->_direction = SyncFileItem::Down;
|
||||
|
|
|
@ -252,11 +252,9 @@ static void propertyMapToFileStat(const QMap<QString, QString> &map, RemoteInfo
|
|||
} else if (property == "id") {
|
||||
result.fileId = value.toUtf8();
|
||||
} else if (property == "downloadURL") {
|
||||
qFatal("FIXME: downloadURL and dDC");
|
||||
//file_stat->directDownloadUrl = value.toUtf8();
|
||||
result.directDownloadUrl = value;
|
||||
} else if (property == "dDC") {
|
||||
qFatal("FIXME: downloadURL and dDC");
|
||||
// file_stat->directDownloadCookies = value.toUtf8();
|
||||
result.directDownloadCookies = value;
|
||||
} else if (property == "permissions") {
|
||||
result.remotePerm = RemotePermissions(value);
|
||||
} else if (property == "checksums") {
|
||||
|
|
|
@ -52,6 +52,9 @@ struct RemoteInfo
|
|||
int64_t size = 0;
|
||||
bool isDirectory = false;
|
||||
bool isValid() const { return !name.isNull(); }
|
||||
|
||||
QString directDownloadUrl;
|
||||
QString directDownloadCookies;
|
||||
};
|
||||
|
||||
struct LocalInfo
|
||||
|
|
Loading…
Reference in a new issue