mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-22 13:05:51 +03:00
Report size for directories in syncenginetestutils propfind response
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
parent
21656cce17
commit
4cdf525df2
1 changed files with 6 additions and 0 deletions
|
@ -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"));
|
||||
|
||||
|
|
Loading…
Reference in a new issue