diff options
author | Brad King <brad.king@kitware.com> | 2014-03-20 13:22:21 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2014-03-20 13:22:21 (GMT) |
commit | c79d98b457e9c2fc87ddf54631640e2efe8d81c4 (patch) | |
tree | 84ca5a7f844f22619a131b6ae75da457698e7625 /Source | |
parent | 9c609db98811f57c9fa086f17e6a8740b317a63b (diff) | |
parent | 413282c0cfb0bafc6ab325c6d4798e4765e021fa (diff) | |
download | CMake-c79d98b457e9c2fc87ddf54631640e2efe8d81c4.zip CMake-c79d98b457e9c2fc87ddf54631640e2efe8d81c4.tar.gz CMake-c79d98b457e9c2fc87ddf54631640e2efe8d81c4.tar.bz2 |
Merge topic 'file-DOWNLOAD-cap-progress'
413282c0 file: Avoid runaway DOWNLOAD/UPLOAD progress reports (#14807)
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmFileCommand.cxx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx index 9fabdc7..5bfb664 100644 --- a/Source/cmFileCommand.cxx +++ b/Source/cmFileCommand.cxx @@ -2539,6 +2539,11 @@ namespace { if (total > 0.0) { this->CurrentPercentage = static_cast<int>(value/total*100.0 + 0.5); + if(this->CurrentPercentage > 100) + { + // Avoid extra progress reports for unexpected data beyond total. + this->CurrentPercentage = 100; + } } bool updated = (OldPercentage != this->CurrentPercentage); |