Skip to content

Commit

Permalink
Merge pull request #1219 from haiwen/change-the-progress-size-variabl…
Browse files Browse the repository at this point in the history
…e-of-the-display-block-to-a-64-bit-integer

Change the progress size variable of the display block to a 64-bit in…
  • Loading branch information
killing authored Sep 24, 2019
2 parents 6bf00b8 + e1ac769 commit 8e0ad4e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/rpc/clone-task.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion src/rpc/clone-task.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 8e0ad4e

Please sign in to comment.