mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-09-05 17:44:55 -06:00
Core: CopyStream progress fix
git-svn-id: svn://ultimatepp.org/upp/trunk@12201 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
f17e244453
commit
f92853bb88
1 changed files with 2 additions and 2 deletions
|
|
@ -1402,11 +1402,11 @@ int64 CopyStream(Stream& dest, Stream& src, int64 count, Gate<int64, int64> prog
|
|||
int64 done = 0;
|
||||
int64 total = count;
|
||||
while(count > 0 && (loaded = src.Get(~temp, (int)min<int64>(count, block))) > 0) {
|
||||
count -= loaded;
|
||||
done += loaded;
|
||||
if(progress(done, total))
|
||||
return -1;
|
||||
dest.Put(~temp, loaded);
|
||||
count -= loaded;
|
||||
done += loaded;
|
||||
}
|
||||
return done;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue