diff --git a/src/rpc/clone-task.cpp b/src/rpc/clone-task.cpp index 66786a367..c9a64c59c 100644 --- a/src/rpc/clone-task.cpp +++ b/src/rpc/clone-task.cpp @@ -58,15 +58,15 @@ CloneTask CloneTask::fromGObject(GObject *obj) return task; } -QString CloneTask::calcProgress(int done, int total) +QString CloneTask::calcProgress(int64_t done, int64_t total) { if (total == 0) { return QString(); } - int percentage = done * 100 / total; + int64_t percentage = done * 100 / total; - return QString().sprintf(" %d%%", percentage); + return QString().sprintf(" %lld%%", percentage); } void CloneTask::translateStateInfo() diff --git a/src/rpc/clone-task.h b/src/rpc/clone-task.h index 28404f65f..7546f5f92 100644 --- a/src/rpc/clone-task.h +++ b/src/rpc/clone-task.h @@ -53,7 +53,7 @@ class CloneTask { } private: - QString calcProgress(int done, int total); + QString calcProgress(int64_t done, int64_t total); }; #endif // SEAFILE_CLIENT_RPC_CLONE_TASK_H