mirror of
https://github.com/nextcloud/desktop.git
synced 2025-10-26 11:17:43 +00:00
Read the quota as double
The server is sending floating point number when the amount of storage is set to a custom number (say 1.2GB) This should fix #1374
This commit is contained in:
parent
cabcdd890e
commit
5c45ede4a5
@ -531,9 +531,11 @@ void CheckQuotaJob::finished()
|
||||
reader.namespaceUri() == QLatin1String("DAV:")) {
|
||||
QString name = reader.name().toString();
|
||||
if (name == QLatin1String("quota-available-bytes")) {
|
||||
quotaAvailableBytes = reader.readElementText().toLongLong();
|
||||
// I have seen the server returning frational bytes:
|
||||
// <d:quota-available-bytes>1374532061.2</d:quota-available-bytes>
|
||||
quotaAvailableBytes = reader.readElementText().toDouble();
|
||||
} else if (name == QLatin1String("quota-used-bytes")) {
|
||||
quotaUsedBytes = reader.readElementText().toLongLong();
|
||||
quotaUsedBytes = reader.readElementText().toDouble();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user