sbt / sbt-s3

sbt-s3 is a simple sbt plugin to manipulate objects on Amazon S3
Apache License 2.0
63 stars 29 forks source link

Fixing the progress overflow. #12

Closed dk8996 closed 10 years ago

dk8996 commented 10 years ago

We ran in to a issue where the progress bar char buffer overflowed and we think its bcs one of the parts of the upload failed and retry happened but the failed part was added to uploadedBytes count. I think this should fix this issue. Here is the exception we are seeing:

WARNING: Unable to cleanly close input stream: String index out of range: 51 java.lang.StringIndexOutOfBoundsException: String index out of range: 51 at java.lang.String.substring(String.java:1907) at com.typesafe.sbt.S3Plugin$.com$typesafe$sbt$S3Plugin$$progressBar(S3Plugin.scala:174) at com.typesafe.sbt.S3Plugin$$anon$1.progressChanged(S3Plugin.scala:200) at com.amazonaws.services.s3.internal.ProgressReportingInputStream.close(ProgressReportingInputStream.java:102

cunei commented 10 years ago

Looks great! Thanks for your contribution!