зеркало из https://github.com/nextcloud/desktop.git
Report size for directories in syncenginetestutils propfind response
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
Родитель
21656cce17
Коммит
4cdf525df2
|
@ -346,6 +346,12 @@ FakePropfindReply::FakePropfindReply(FileInfo &remoteRootFileInfo, QNetworkAcces
|
|||
xml.writeStartElement(davUri, QStringLiteral("resourcetype"));
|
||||
xml.writeEmptyElement(davUri, QStringLiteral("collection"));
|
||||
xml.writeEndElement(); // resourcetype
|
||||
|
||||
auto totalSize = 0;
|
||||
for (const auto &child : fileInfo.children.values()) {
|
||||
totalSize += child.size;
|
||||
}
|
||||
xml.writeTextElement(ocUri, QStringLiteral("size"), QString::number(totalSize));
|
||||
} else
|
||||
xml.writeEmptyElement(davUri, QStringLiteral("resourcetype"));
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче