[Pkg-owncloud-commits] [owncloud-client] 155/333: Read the quota as double
Sandro Knauß
hefee-guest at moszumanska.debian.org
Thu Apr 17 23:16:47 UTC 2014
This is an automated email from the git hooks/post-receive script.
hefee-guest pushed a commit to branch master
in repository owncloud-client.
commit 5c45ede4a56b6fb7c97810b098ead551c59a3ef2
Author: Olivier Goffart <ogoffart at woboq.com>
Date: Mon Mar 17 10:37:06 2014 +0100
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
---
src/mirall/networkjobs.cpp | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/mirall/networkjobs.cpp b/src/mirall/networkjobs.cpp
index a6b3d21..bd17f17 100644
--- a/src/mirall/networkjobs.cpp
+++ b/src/mirall/networkjobs.cpp
@@ -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();
}
}
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git
More information about the Pkg-owncloud-commits
mailing list