Cloud storage: verbose output to console

If Subsurface is started with the verbose flag, also give progress
information on the consol (just in case there are issues with the progress
dialog).

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2015-09-20 08:41:21 -07:00
parent 06d6ca94f3
commit 54ec332c2f

View file

@ -56,9 +56,14 @@ void set_git_update_cb(int(*cb)(int))
static int update_progress(int percent) static int update_progress(int percent)
{ {
static int last_percent = -10;
int ret = 0; int ret = 0;
if (update_progress_cb) if (update_progress_cb)
ret = (*update_progress_cb)(percent); ret = (*update_progress_cb)(percent);
if (verbose && percent - 10 >= last_percent) {
last_percent = percent;
fprintf(stderr, "git progress %d%%\n", percent);
}
return ret; return ret;
} }