Skip to content

Commit

Permalink
Merge pull request #1 from NikR-IV/NikR-IV-patch-1
Browse files Browse the repository at this point in the history
Update ProgressBar.java
  • Loading branch information
NikR-IV authored Feb 25, 2022
2 parents 87600ec + a5e570e commit fdeebf1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/me/tongfei/progressbar/ProgressBar.java
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ public static InputStream wrap(InputStream is, String task) {
*/
public static InputStream wrap(InputStream is, ProgressBarBuilder pbb) {
long size = Util.getInputStreamSize(is);
if (size != -1 && pbb.initialMaxIsSet())
if (size != -1 && !pbb.initialMaxIsSet())
pbb.setInitialMax(size);
return new ProgressBarWrappedInputStream(is, pbb.build());
}
Expand Down

0 comments on commit fdeebf1

Please sign in to comment.