aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--backends/cloud/dropbox/dropboxstorage.cpp8
-rw-r--r--backends/cloud/onedrive/onedrivestorage.cpp2
-rw-r--r--backends/cloud/storageinfo.h8
3 files changed, 9 insertions, 9 deletions
diff --git a/backends/cloud/dropbox/dropboxstorage.cpp b/backends/cloud/dropbox/dropboxstorage.cpp
index 1aae73e524..263c2c8132 100644
--- a/backends/cloud/dropbox/dropboxstorage.cpp
+++ b/backends/cloud/dropbox/dropboxstorage.cpp
@@ -181,9 +181,9 @@ void DropboxStorage::infoInnerCallback(StorageInfoCallback outerCallback, Networ
Common::String name = info.getVal("display_name")->asString();
Common::String email = info.getVal("email")->asString();
Common::JSONObject quota = info.getVal("quota_info")->asObject();
- uint32 quotaNormal = quota.getVal("normal")->asIntegerNumber();
- uint32 quotaShared = quota.getVal("shared")->asIntegerNumber();
- uint32 quotaAllocated = quota.getVal("quota")->asIntegerNumber();
+ uint64 quotaNormal = quota.getVal("normal")->asIntegerNumber();
+ uint64 quotaShared = quota.getVal("shared")->asIntegerNumber();
+ uint64 quotaAllocated = quota.getVal("quota")->asIntegerNumber();
(*outerCallback)(StorageInfoResponse(nullptr, StorageInfo(uid, name, email, quotaNormal+quotaShared, quotaAllocated)));
delete outerCallback;
}
@@ -195,7 +195,7 @@ void DropboxStorage::infoMethodCallback(StorageInfoResponse response) {
debug("\nStorage info:");
debug("User name: %s", response.value.name().c_str());
debug("Email: %s", response.value.email().c_str());
- debug("Disk usage: %u/%u", response.value.used(), response.value.available());
+ debug("Disk usage: %u/%u", (uint32)response.value.used(), (uint32)response.value.available());
}
DropboxStorage *DropboxStorage::loadFromConfig(Common::String keyPrefix) {
diff --git a/backends/cloud/onedrive/onedrivestorage.cpp b/backends/cloud/onedrive/onedrivestorage.cpp
index fb2ead3364..c64ed6bf72 100644
--- a/backends/cloud/onedrive/onedrivestorage.cpp
+++ b/backends/cloud/onedrive/onedrivestorage.cpp
@@ -143,7 +143,7 @@ void OneDriveStorage::infoInnerCallback(StorageInfoCallback outerCallback, Netwo
Common::JSONObject info = json->asObject();
Common::String uid, name, email;
- uint32 quotaUsed = 0, quotaAllocated = 25 * 1024 * 1024 * 1024; // 25 GB, because I actually don't know any way to find out the real one
+ uint64 quotaUsed = 0, quotaAllocated = 26843545600L; // 25 GB, because I actually don't know any way to find out the real one
if (info.contains("createdBy") && info.getVal("createdBy")->isObject()) {
Common::JSONObject createdBy = info.getVal("createdBy")->asObject();
diff --git a/backends/cloud/storageinfo.h b/backends/cloud/storageinfo.h
index 1492898a6c..e0666bc190 100644
--- a/backends/cloud/storageinfo.h
+++ b/backends/cloud/storageinfo.h
@@ -34,17 +34,17 @@ namespace Cloud {
class StorageInfo {
Common::String _uid, _name, _email;
- uint32 _usedBytes, _allocatedBytes;
+ uint64 _usedBytes, _allocatedBytes;
public:
- StorageInfo(Common::String uid, Common::String name, Common::String email, uint32 used, uint32 allocated):
+ StorageInfo(Common::String uid, Common::String name, Common::String email, uint64 used, uint64 allocated):
_uid(uid), _name(name), _email(email), _usedBytes(used), _allocatedBytes(allocated) {}
Common::String uid() const { return _uid; }
Common::String name() const { return _name; }
Common::String email() const { return _email; }
- uint32 used() const { return _usedBytes; }
- uint32 available() const { return _allocatedBytes; }
+ uint64 used() const { return _usedBytes; }
+ uint64 available() const { return _allocatedBytes; }
};